public function indexAction()
 {
     // if not logged-in and no submit
     if (!$this->getAuth()->getUserId() && !$this->getLogin()) {
         // try to login using cookies
         $res = $this->loginWithCookies();
         if ($res && $res->isValid()) {
             return $this->onLogin(self::COOKIE);
         }
         // now try plugins
         $res = $this->loginWithPlugins();
         if ($res && $res->isValid()) {
             $this->authResult = $res;
             return $this->onLogin(self::PLUGINS);
         }
     }
     parent::indexAction();
 }
Esempio n. 2
0
 public function indexAction()
 {
     if ($this->getAuth()->getUsername()) {
         $this->getDi()->hook->call(new Am_Event_AuthSessionRefresh($this->getAuth()->getUser()));
     }
     // if not logged-in and no submit
     if (!$this->getAuth()->getUserId() && !$this->getLogin()) {
         $res = $this->getAuth()->checkExternalLogin($this->getRequest());
         if ($res && $res->isValid()) {
             $this->authResult = $res;
             return $this->onLogin(self::PLUGINS);
         }
     }
     parent::indexAction();
 }