static function login($sLogin, $sPassword, $bResume)
 {
     //authenticate
     $oUser = AnwUsers::authenticate($sLogin, $sPassword);
     //user is authenticated, open the session
     self::getSession()->login($oUser, $bResume);
     AnwSessions::login($oUser, $bResume);
     AnwPlugins::hook("user_loggedin", $oUser, $sPassword, $bResume);
 }
示例#2
0
 function authenticate($sPassword)
 {
     AnwUsers::authenticate($this->getLogin(), $sPassword);
 }
 protected function chooseAndGrant($sLogin, $sPassword)
 {
     try {
         //try to authenticate
         $oUser = AnwUsers::authenticate($sLogin, $sPassword);
         $this->grantUserAdmin($oUser);
         return;
     } catch (AnwAuthException $e) {
         $sError = $this->g_("err_auth");
     } catch (AnwBadLoginException $e) {
         $sError = $this->g_("err_badlogin");
     } catch (AnwBadPasswordException $e) {
         $sError = $this->g_("err_badpassword");
     }
     $this->showChooseGrant("", "", "", $sLogin, "", $sError);
 }