Prado\Security\TAuthManager::login PHP Метод

login() публичный Метод

The username and password will be used to validate if login is successful. If yes, a user object will be created for the application.
public login ( $username, $password, $expire ) : boolean
Результат boolean if login is successful
    public function login($username, $password, $expire = 0)
    {
        if ($this->_userManager->validateUser($username, $password)) {
            if (($user = $this->_userManager->getUser($username)) === null) {
                return false;
            }
            $this->updateSessionUser($user);
            $this->getApplication()->setUser($user);
            if ($expire > 0) {
                $cookie = new THttpCookie($this->getUserKey(), '');
                $cookie->setExpire(time() + $expire);
                $this->_userManager->saveUserToCookie($cookie);
                $this->getResponse()->getCookies()->add($cookie);
            }
            return true;
        } else {
            return false;
        }
    }