Weird login error

Weird login error

by Raymond Mlambo -
Number of replies: 3

I keep getting the error message below when I try to login as an admin. The first message is from Site Administration -> report -> logs ***

Login failed for the username 'admin' for the reason with id '3'.

This one is from the logs table in the DB:

eventname: \core\event\user_login_failed
other: a:2:{s:8:"username";s:5:"admin";s:6:"reason";i:3;}
Average of ratings: -
In reply to Raymond Mlambo

Re: Weird login error

by Nitesh Kumar -

Hi Raymond,

Below are the reason ids.  Reason id 3 means "Can not login, most probably password did not match. ". 

/** Login attempt successful. */
define('AUTH_LOGIN_OK', 0);
/** Can not login because user does not exist. */
define('AUTH_LOGIN_NOUSER', 1);
/** Can not login because user is suspended. */
define('AUTH_LOGIN_SUSPENDED', 2);
/** Can not login, most probably password did not match. */
define('AUTH_LOGIN_FAILED', 3);
/** Can not login because user is locked out. */
define('AUTH_LOGIN_LOCKOUT', 4);
/** Can not login becauser user is not authorised. */
define('AUTH_LOGIN_UNAUTHORISED', 5);

In reply to Nitesh Kumar

Re: Weird login error

by Raymond Mlambo -
Hi Nitesh,


I have reset the password countless times now, including from the database using an sql query. it still doesnt work.

I have a suspicion that whatever the problem is, its related to my logins into the moodle mobile app that I was customizing. I normally login into the app using the admin username and password. But now, I cant use those login details anymore - even if I reset them -  yet other credentials work.



In reply to Raymond Mlambo

Re: Weird login error

by Raymond Mlambo -

Hi,

Is there anyone who can assist with this? I know I'm putting the right username and password, and I keep getting the same error message.

Funny thing is, this is only happening in my dev environment, not in production. In production, same username and password work perfectly, but in dev, they dont work.

Even after importing the same database from production to dev!