mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-05 10:16:48 +02:00
Removed the possibility to enumerate the users (#849)
Using the forgot password feature.
This commit is contained in:
@@ -730,20 +730,16 @@ class AdminController
|
||||
}
|
||||
|
||||
if (!$user || !$user->exists()) {
|
||||
$this->admin->setMessage($this->admin->translate([
|
||||
'PLUGIN_ADMIN.FORGOT_USERNAME_DOES_NOT_EXIST',
|
||||
$username
|
||||
]), 'error');
|
||||
$this->admin->setMessage($this->admin->translate('PLUGIN_ADMIN.FORGOT_INSTRUCTIONS_SENT_VIA_EMAIL'),
|
||||
'info');
|
||||
$this->setRedirect($post['redirect']);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (empty($user->email)) {
|
||||
$this->admin->setMessage($this->admin->translate([
|
||||
'PLUGIN_ADMIN.FORGOT_CANNOT_RESET_EMAIL_NO_EMAIL',
|
||||
$username
|
||||
]), 'error');
|
||||
$this->admin->setMessage($this->admin->translate('PLUGIN_ADMIN.FORGOT_INSTRUCTIONS_SENT_VIA_EMAIL'),
|
||||
'info');
|
||||
$this->setRedirect($post['redirect']);
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user