/** @var $user \OC\User\User */
\OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password));
});
+ $userSession->listen('\OC\User', 'postRememberedLogin', function ($user, $password) {
+ /** @var $user \OC\User\User */
+ \OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password));
+ });
$userSession->listen('\OC\User', 'logout', function () {
\OC_Hook::emit('OC_User', 'logout', array());
});
$this->setToken($token->getId());
$this->lockdownManager->setToken($token);
$user->updateLastLoginTimestamp();
- $this->manager->emit('\OC\User', 'postRememberedLogin', [$user]);
+ $password = null;
+ try {
+ $password = $this->tokenProvider->getPassword($token, $sessionId);
+ } catch (PasswordlessTokenException $ex) {
+ // Ignore
+ }
+ $this->manager->emit('\OC\User', 'postRememberedLogin', [$user, $password]);
return true;
}