Page MenuHomeIn-Portal Phabricator

D476.id1223.diff
No OneTemporary

File Metadata

Created
Wed, Feb 26, 9:01 AM

D476.id1223.diff

Index: core/kernel/session/session_storage.php
===================================================================
--- core/kernel/session/session_storage.php
+++ core/kernel/session/session_storage.php
@@ -141,6 +141,9 @@
$this->SetField($field_name, $field_value);
}
+ // Reset change flags, because session is already saved to the database.
+ $this->ChangedDirectVars = array();
+
// ensure user groups are stored in a way, that kPermissionsHelper::CheckUserPermission can understand
$this->Session->StoreVar('UserGroups', $this->GetField('GroupList'), !$to_database);
}
@@ -254,6 +257,7 @@
if ( $replace != '' ) {
$query = ' REPLACE INTO ' . $this->SessionDataTable . ' (' . $this->IDField . ', ' . $this->DataVarField . ', ' . $this->DataValueField . ') VALUES ' . $replace;
$this->Conn->Query($query);
+ $this->OriginalData = $ses_data;
}
if ( $this->ChangedDirectVars ) {
@@ -267,6 +271,7 @@
SET ' . implode(',', $changes) . '
WHERE ' . $this->IDField . ' = ' . $this->Conn->qstr($this->Session->GetID());
$this->Conn->Query($query);
+ $this->ChangedDirectVars = array();
}
}
Index: core/units/helpers/user_helper.php
===================================================================
--- core/units/helpers/user_helper.php
+++ core/units/helpers/user_helper.php
@@ -189,6 +189,8 @@
$this->Application->StorePersistentVar('ThisLogin', adodb_mktime());
}
+ $this->Application->Session->SaveData();
+
$hook_event = new kEvent('u:OnAfterLogin');
$hook_event->MasterEvent = $this->event;
$this->Application->HandleEvent($hook_event);

Event Timeline