Skip to content

Commit ea6ceb1

Browse files
authored
Merge pull request #1 from bratao/bratao-keep-sessions
Use the parent name so we can keep the old sessions
2 parents 57dcc45 + 3888f4b commit ea6ceb1

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Laravel/SessionGuard.php

+21
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,27 @@ public function setRequest(Request $request)
5656

5757
return parent::setRequest($request);
5858
}
59+
60+
/**
61+
* Get a unique identifier for the auth session value.
62+
*
63+
* @return string
64+
*/
65+
public function getName()
66+
{
67+
return 'login_'.$this->name.'_'.sha1(parent::class);
68+
}
5969

70+
/**
71+
* Get the name of the cookie used to store the "recaller".
72+
*
73+
* @return string
74+
*/
75+
public function getRecallerName()
76+
{
77+
return 'remember_'.$this->name.'_'.sha1(parent::class);
78+
}
79+
6080
/**
6181
* Reset the state of current class instance.
6282
*
@@ -69,5 +89,6 @@ protected function reset()
6989
$this->viaRemember = false;
7090
$this->loggedOut = false;
7191
$this->tokenRetrievalAttempted = false;
92+
$this->recallAttempted = false;
7293
}
7394
}

0 commit comments

Comments
 (0)