Commit 9fd91f8e authored by Andrew Nicols's avatar Andrew Nicols
Browse files

Merge branch 'master-MDL-51892' of

parents 6e186498 5fd7c11d
......@@ -70,7 +70,23 @@ class user_login_failed extends base {
public function get_description() {
// Note that username could be any random user input.
$username = s($this->other['username']);
return "Login failed for the username '{$username}' for the reason with id '{$this->other['reason']}'.";
$reasonid = $this->other['reason'];
$loginfailed = 'Login failed for user';
switch ($reasonid){
case 1:
return $loginfailed." '{$username}'. User does not exist (error ID '{$reasonid}').";
case 2:
return $loginfailed." '{$username}'. User is suspended (error ID '{$reasonid}').";
case 3:
return $loginfailed." '{$username}'. Most likely the password did not match (error ID '{$reasonid}').";
case 4:
return $loginfailed." '{$username}'. User is locked out (error ID '{$reasonid}').";
case 5:
return $loginfailed." '{$username}'. User is not authorised (error ID '{$reasonid}').";
return $loginfailed." '{$username}', error ID '{$reasonid}'.";
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment