public function authenticate($userName, $password)
    {
        $this->beforeLogin($userName, $password);
        $result = $this->adapter->authenticate($userName, $password);
        if ($result) {
            $this->profile->loadProfile("$this->userNameFieldName = '$userName'");
            $this->profile->resetToken();
        }
        $this->afterLogin($userName, $password, $result);
        return $result;
    }
public function authenticate($userName, $password)
    {
        $this->beforeLogin($userName, $password);
        $result = $this->adapter->authenticate($userName, $password);
        if ($result) {
            $this->profile->loadProfile("$this->userNameFieldName = '$userName'");
            $this->profile->resetToken();
        }
        $this->afterLogin($userName, $password, $result);
        return $result;
    }
public function authenticate ( $ userName , $ password ) { $ this -> beforeLogin ( $ userName , $ password ) ; $ result = $ this -> adapter -> authenticate ( $ userName , $ password ) ; if ( $ result ) { $ this -> profile -> loadProfile ( "$this->userNameFieldName = '$userName'" ) ; $ this -> profile -> resetToken ( ) ; } $ this -> afterLogin ( $ userName , $ password , $ result ) ; return $ result ; }
run a set of credentials against the adapters internal authenticate function
will retain a copy of the adapter provided profile

@param string $userName
@param string $password
@return boolean
run a set of credentials against the adapters internal authenticate function will retain a copy of the adapter provided profile