mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-01-06 15:43:01 +01:00
strtolower the username prior to calling authenticate
This commit is contained in:
@@ -115,6 +115,7 @@ class AdminController
|
||||
|
||||
$success = false;
|
||||
$method = 'task' . ucfirst($this->task);
|
||||
|
||||
if (method_exists($this, $method)) {
|
||||
try {
|
||||
$success = call_user_func(array($this, $method));
|
||||
@@ -197,6 +198,7 @@ class AdminController
|
||||
*/
|
||||
protected function taskLogin()
|
||||
{
|
||||
$this->post['username'] = strtolower($this->post['username']);
|
||||
if ($this->admin->authenticate($this->post)) {
|
||||
// should never reach here, redirects first
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user