Backend\Core\Engine\Authentication::getEncryptedPassword PHP Méthode

getEncryptedPassword() public static méthode

Returns the encrypted password for a user by giving a email/password Returns false if no user was found for this user/pass combination
public static getEncryptedPassword ( string $email, string $password ) : string
$email string The email.
$password string The password.
Résultat string
    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);
    }