well with debug = on. In fact the change password screen didn't play at all.
Made a few small changes to fix notices and now everything works OK.
Added a missing language string.
*****************
This problem may very well exist in MOODLE_14_STABLE too! Unfortunately I
don't have access to a 1.4 checkout right now, so it will have to wait.
*****************
$string['moveselectedcoursesto'] = 'Move selected courses to...';
$string['movetoanotherfolder'] = 'Move to another folder';
$string['moveup'] = 'Move up';
+$string['mustchangepassword'] = 'The new password must be different than the current one';
$string['mustconfirm'] = 'You need to confirm your login';
$string['mycourses'] = 'My courses';
$string['name'] = 'Name';
$strpasswordchanged = get_string("passwordchanged");
- if ($course->id) {
+ if (!empty($course->id)) {
add_to_log($course->id, "user", "change password", "view.php?id=$user->id&course=$course->id", "$user->id");
$fullname = fullname($USER, true);
print_header($strpasswordchanged, $strpasswordchanged,
}
}
-
-
- if ($course->id) {
- $frm->id = $id;
- }
+ // We NEED to set this, because the form assumes it has a value!
+ $frm->id = empty($course->id) ? 0 : $course->id;
if (empty($frm->username)) {
$frm->username = get_moodle_cookie();
}
echo " </td>";
echo "</tr>\n";
- if (!$adminself && ($CFG->{'auth_'.$user->auth.'_stdchangepassword'} || $CFG->changepassword)){
+ if (!$adminself && (!empty($CFG->{'auth_'.$user->auth.'_stdchangepassword'}) || $CFG->changepassword)){
if (get_user_preferences('auth_forcepasswordchange', NULL, $user->id)) {
$checked = ' checked="checked" ';
} else {