/** * Attempt to log in the user to the ILS, and save credentials if it works. * * @param string $username Catalog username * @param string $password Catalog password * * Returns associative array of patron data on success, false on failure. * * @return array|bool * @throws ILSException */ public function newCatalogLogin($username, $password) { $result = $this->catalog->patronLogin($username, $password); if ($result) { $user = $this->auth->isLoggedIn(); if ($user) { $user->saveCredentials($username, $password); $this->auth->updateSession($user); // cache for future use $this->ilsAccount[$username] = $result; } return $result; } return false; }