/**
* Get the login/profile status for the given e-mail and password.
*
* @param string $email Profile email address.
* @param string $password Profile password.
* @return string One of the FrontendProfilesAuthentication::LOGIN_* constants.
*/
public static function getLoginStatus($email, $password)
{
$email = (string) $email;
$password = (string) $password;
// get profile id
$profileId = FrontendProfilesModel::getIdByEmail($email);
// encrypt password
$encryptedPassword = FrontendProfilesModel::getEncryptedString($password, FrontendProfilesModel::getSetting($profileId, 'salt'));
// get the status
$loginStatus = FrontendModel::getContainer()->get('database')->getVar('SELECT p.status
FROM profiles AS p
WHERE p.email = ? AND p.password = ?', array($email, $encryptedPassword));
return empty($loginStatus) ? self::LOGIN_INVALID : $loginStatus;
}