You are here

function saml_sp_get_request_store in SAML Service Provider 7.2

Same name and namespace in other branches
  1. 7.3 saml_sp.module \saml_sp_get_request_store()

fetch request data

1 call to saml_sp_get_request_store()
saml_sp__get_tracked_request in ./saml_sp.module
Get the IDP and callback from a tracked request.

File

./saml_sp.module, line 842
SAML Service Provider

Code

function saml_sp_get_request_store($id) {
  $request = db_select('saml_sp_requests')
    ->fields('saml_sp_requests', array(
    'data',
  ))
    ->condition('id', $id)
    ->execute()
    ->fetchObject();
  $data = FALSE;
  if (is_object($request) && isset($request->data) && !empty($request->data)) {
    $data = unserialize($request->data);
  }
  if (!isset($data['idp']) || empty($data['idp'])) {
    $data['idp'] = variable_get('saml_sp_drupal_login__idp', '');
  }
  return $data;
}