Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 function authenticate($sPassword)
 {
     AnwUsers::authenticate($this->getLogin(), $sPassword);
 }
Ejemplo n.º 3
0
 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);
 }