From 56272bb56d41ce8e53cdb00ff38e6b2f4ba79c06 Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Tue, 3 Nov 2015 14:46:59 +0000 Subject: [PATCH] MDL-45814 login: don't prompt guest user to change password --- login/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/login/index.php b/login/index.php index dab9cb1d19b..2a359cc5a11 100644 --- a/login/index.php +++ b/login/index.php @@ -199,7 +199,7 @@ if ($frm and isset($frm->username)) { // Login WITH /// check if user password has expired /// Currently supported only for ldap-authentication module $userauth = get_auth_plugin($USER->auth); - if (!empty($userauth->config->expiration) and $userauth->config->expiration == 1) { + if (!isguestuser() and !empty($userauth->config->expiration) and $userauth->config->expiration == 1) { if ($userauth->can_change_password()) { $passwordchangeurl = $userauth->change_password_url(); if (!$passwordchangeurl) {