1
0
mirror of https://github.com/delight-im/PHP-Auth.git synced 2025-08-04 15:17:28 +02:00

Ensure compatibility with SQLite which does not cast to native types

This commit is contained in:
Marco
2017-06-12 20:29:58 +02:00
parent 8fc0b98493
commit ee485f99ab

View File

@@ -584,7 +584,7 @@ final class Auth extends UserManager {
); );
// ensure that the account has been verified before initiating a password reset // ensure that the account has been verified before initiating a password reset
if ($userData['verified'] !== 1) { if ((int) $userData['verified'] !== 1) {
throw new EmailNotVerifiedException(); throw new EmailNotVerifiedException();
} }
@@ -679,7 +679,7 @@ final class Auth extends UserManager {
$this->updatePassword($userData['id'], $password); $this->updatePassword($userData['id'], $password);
} }
if ($userData['verified'] === 1) { if ((int) $userData['verified'] === 1) {
$this->onLoginSuccessful($userData['id'], $userData['email'], $userData['username'], $userData['status'], false); $this->onLoginSuccessful($userData['id'], $userData['email'], $userData['username'], $userData['status'], false);
// continue to support the old parameter format // continue to support the old parameter format