/** * Try to log in the user using current query parameters; return User object * on success, throws exception on failure. * * @param \Zend\Http\PhpEnvironment\Request $request Request object containing * account credentials. * * @throws AuthException * @return User Object representing logged-in user. */ public function login($request) { $user = parent::login($request); $auth = $this->getAuth(); if ($auth instanceof ChoiceAuth) { $method = $auth->getSelectedAuthOption(); } else { $method = $this->activeAuth; } $user->finna_auth_method = strtolower($method); $user->finna_last_login = date('Y-m-d H:i:s'); $user->save(); return $user; }
/** * Try to log in the user using current query parameters; return User object * on success, throws exception on failure. * * @param \Zend\Http\PhpEnvironment\Request $request * Request object containing * account credentials. * * @throws AuthException * @return UserRow Object representing logged-in user. */ public function login($request) { return parent::login($request); }