protected function _findUser($username, $password)
{
$clientIp = $this->request->clientIp(false);
try {
$this->_initializeAPI();
$userToken = $this->Api->authenticatePrincipal($username, $password, $this->settings['app_name'], $clientIp);
$this->user = array();
$this->user['User'] = $this->_getPrincipalAttributes($username);
$this->user['User']['token'] = $userToken;
$this->user['Group'] = $this->_getPrincipalGroups($username);
return $this->user;
} catch (CrowdAuthException $e) {
return false;
}
}