Example #1
0
 /**
  * This action can only be accessed from the admin console, and passes a KS with which it is possible to access the VAR console
  */
 public function adminLoginAction()
 {
     $form = new Form_AdminLogin();
     $this->view->form = $form;
     KalturaLog::debug('creating auth adapter');
     $adapter = new Kaltura_VarAuthAdapter();
     $adapter->setTimezoneOffset($this->_getParam('timezone_offset'));
     $adapter->setKS($this->_getParam('ks'));
     //$adapter = new Zend_Auth_Adapter_DbTable($zendDb);
     $auth = Infra_AuthHelper::getAuthInstance();
     $result = $auth->authenticate($adapter);
     if ($result->isValid()) {
         $this->_helper->redirector('list-by-user', 'partner');
     } else {
         $form->setDescription('invalid login');
     }
     $form->setDefault('next_uri', $this->_getParam('next_uri'));
     // set in Infra_AuthPlugin
 }