You are here

function ulogin_exit in uLogin (advanced version) 7

Implements hook_exit(). Intercepts drupal_goto() calls from Legal legal_user_login().

File

./ulogin.module, line 386
Main file for the uLogin module.

Code

function ulogin_exit($destination = NULL) {
  global $ulogin_data;
  if (!empty($ulogin_data) && preg_match('/\\/legal_accept\\/([\\d]*)\\//', $destination, $matches) && !_ulogin_identity_load($ulogin_data)) {
    $uid = $matches[1];
    _ulogin_user_save($ulogin_data, $uid);
  }
}