Skip to content
Permalink
Browse files

Store user data in memory on login for stateless auth adapters

  • Loading branch information...
biesbjerg committed Jul 5, 2016
1 parent 6bccfe9 commit f22129b9c73734b3c62dc5570d290f02d67c9bf1
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/Cake/Controller/Component/AuthComponent.php
@@ -611,8 +611,12 @@ public function login($user = null) {
$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);
}

0 comments on commit f22129b

Please sign in to comment.
You can’t perform that action at this time.