/** * Check access by username/password/ip */ function byLoginPassIpAction() { $code = null; $user = $this->getDi()->userTable->getAuthenticatedRow($this->_getParam('login'), $this->_getParam('pass'), $code); $res = new Am_Auth_Result($code); $this->checkUser($user, $res->getCode(), $res->getMessage(), $this->_getParam('ip')); }
public function indexAction() { if (null != $this->getAuth()->getUsername()) { return $this->redirectOk(); } $login = $this->getLogin(); $pass = $this->getPass(); if (strlen($login) && strlen($pass)) { $this->authResult = $this->doLogin(); if ($this->authResult->isValid()) { return $this->onLogin(); } else { $this->view->error = array($this->authResult->getMessage()); } } else { if ($this->_request->isPost()) { $this->view->error = array(___("Please enter username and password")); } } $this->view->{$this->loginField} = $login; $this->view->hidden = $this->getHiddenVars(); $this->renderLoginPage(); }