public static function getEncryptedPassword($email, $password)
{
$email = (string) $email;
$password = (string) $password;
// fetch user ID by email
$userId = BackendUsersModel::getIdByEmail($email);
// check if a user ID was found, return false if no user exists
if ($userId === false) {
return false;
}
// fetch user record
$user = new User($userId);
$key = $user->getSetting('password_key');
// return the encrypted string
return (string) self::getEncryptedString($password, $key);
}