Skip to content

Commit c4bfb69

Browse files
author
Jared Hancock
committed
Don't recreate session on login
1 parent dfaca0d commit c4bfb69

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

include/class.auth.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -320,15 +320,6 @@ function login($staff, $bk) {
320320
$_SESSION['TZ_OFFSET'] = $staff->getTZoffset();
321321
$_SESSION['TZ_DST'] = $staff->observeDaylight();
322322

323-
//Regenerate session id.
324-
$sid = session_id(); //Current id
325-
session_regenerate_id(true);
326-
// Destroy old session ID - needed for PHP version < 5.1.0
327-
// DELME: remove when we move to php 5.3 as min. requirement.
328-
if(($session=$ost->getSession()) && is_object($session)
329-
&& $sid!=session_id())
330-
$session->destroy($sid);
331-
332323
Signal::send('auth.login.succeeded', $staff);
333324

334325
$staff->cancelResetTokens();
@@ -444,12 +435,6 @@ function login($user, $bk) {
444435
$user->getUserName(), $user->getId(), $_SERVER['REMOTE_ADDR']);
445436
$ost->logDebug('User login', $msg);
446437

447-
//Regenerate session ID.
448-
$sid=session_id(); //Current session id.
449-
session_regenerate_id(TRUE); //get new ID.
450-
if(($session=$ost->getSession()) && is_object($session) && $sid!=session_id())
451-
$session->destroy($sid);
452-
453438
return true;
454439
}
455440

0 commit comments

Comments
 (0)