Skip to content
Browse files

Fixing problem where admins couldn't change their password (with exte…

…rnal auth)
  • Loading branch information...
1 parent b444e02 commit 0bbef3919cc77981df96917e2f05097c18c35750 mjollnir_ committed Dec 4, 2005
Showing with 5 additions and 1 deletion.
  1. +5 −1 login/change_password.php
View
6 login/change_password.php
@@ -137,6 +137,10 @@
*****************************************************************************/
function validate_form($frm, &$err) {
+ // we always need to call this because it handles the
+ // loading of the auth libraries, and we need that for later.
+ $validatepw = authenticate_user_login($frm->username, $frm->password);
+
if (empty($frm->username)){
$err->username = get_string('missingusername');
} else {
@@ -145,7 +149,7 @@ function validate_form($frm, &$err) {
} else {
if (!isadmin()) {
//require non adminusers to give valid password
- if(!authenticate_user_login($frm->username, $frm->password)) {
+ if(!$validatepw) {
$err->password = get_string('wrongpassword');
}
}

0 comments on commit 0bbef39

Please sign in to comment.
Something went wrong with that request. Please try again.