Commit c69a822d authored by mikeytown2's avatar mikeytown2

Issue #2263203 by mikeytown2: Fix session issues.

parent 6d9854df
......@@ -3136,9 +3136,12 @@ function httprl_drupal_get_private_key() {
*/
function httprl_call_exit() {
if (defined('VERSION') && substr(VERSION, 0, 1) >= 7 && drupal_get_bootstrap_phase() == DRUPAL_BOOTSTRAP_FULL) {
// Do not write the session.
drupal_save_session(FALSE);
drupal_exit();
}
else {
session_save_session(FALSE);
exit;
}
}
......@@ -3200,10 +3203,15 @@ function httprl_is_background_callback_capable() {
* Integer specifying the user ID to load.
*/
function httprl_set_user($uid) {
global $user;
$account = user_load($uid);
if (!empty($account)) {
$user = $account;
$GLOBALS['user'] = $account;
if (defined('VERSION') && substr(VERSION, 0, 1) >= 7) {
drupal_save_session(FALSE);
}
else {
session_save_session(FALSE);
}
return TRUE;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment