mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-08-04 15:17:28 +02:00
Show that users are to reconfirm their password for reset control
This commit is contained in:
12
README.md
12
README.md
@@ -705,13 +705,21 @@ You may provide security-conscious (and experienced) users with the possibility
|
||||
|
||||
```php
|
||||
try {
|
||||
$auth->setPasswordResetEnabled($_POST['enabled'] == 1);
|
||||
if ($auth->reconfirmPassword($_POST['password'])) {
|
||||
$auth->setPasswordResetEnabled($_POST['enabled'] == 1);
|
||||
|
||||
// the settings have been changed
|
||||
// the settings have been changed
|
||||
}
|
||||
else {
|
||||
// we can't say if the user is who they claim to be
|
||||
}
|
||||
}
|
||||
catch (\Delight\Auth\NotLoggedInException $e) {
|
||||
// the user is not signed in
|
||||
}
|
||||
catch (\Delight\Auth\TooManyRequestsException $e) {
|
||||
// too many requests
|
||||
}
|
||||
```
|
||||
|
||||
In order to check the current value of this setting, use the return value from
|
||||
|
Reference in New Issue
Block a user