mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-06 11:32:40 +00:00
Store user data in memory on login for stateless auth adapters
This commit is contained in:
parent
6bccfe9f40
commit
f22129b9c7
1 changed files with 6 additions and 2 deletions
|
@ -611,8 +611,12 @@ class AuthComponent extends Component {
|
|||
$user = $this->identify($this->request, $this->response);
|
||||
}
|
||||
if ($user) {
|
||||
$this->Session->renew();
|
||||
$this->Session->write(static::$sessionKey, $user);
|
||||
if (static::$sessionKey) {
|
||||
$this->Session->renew();
|
||||
$this->Session->write(static::$sessionKey, $user);
|
||||
} else {
|
||||
static::$_user = $user;
|
||||
}
|
||||
$event = new CakeEvent('Auth.afterIdentify', $this, array('user' => $user));
|
||||
$this->_Collection->getController()->getEventManager()->dispatch($event);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue