Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F803847
D476.id1224.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Feb 26, 8:59 AM
Size
1 KB
Mime Type
text/x-diff
Expires
Thu, Feb 27, 8:59 AM (7 h, 34 m)
Engine
blob
Format
Raw Data
Handle
576570
Attached To
D476: INP-1870 - Save the session to the database immediately after the user login
D476.id1224.diff
View Options
Index: branches/5.2.x/core/kernel/session/session_storage.php
===================================================================
--- branches/5.2.x/core/kernel/session/session_storage.php
+++ branches/5.2.x/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: branches/5.2.x/core/units/helpers/user_helper.php
===================================================================
--- branches/5.2.x/core/units/helpers/user_helper.php
+++ branches/5.2.x/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
Log In to Comment