From: moodler Date: Thu, 28 Nov 2002 12:31:46 +0000 (+0000) Subject: With external authentication, the change password button on the user X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=3086f3f6cf524cbab374bcb66dbf3ec7abeabda9;p=moodle.git With external authentication, the change password button on the user page now does the same thing as the one on the login page. It takes you to the specified URL is it exists, and just doesn't appear if there is no URL --- diff --git a/lang/en/auth.php b/lang/en/auth.php index 5995e22896..07f1718d1d 100644 --- a/lang/en/auth.php +++ b/lang/en/auth.php @@ -49,7 +49,7 @@ $string['auth_pop3type'] = "Server type. If your server uses certificate securit $string['authenticationoptions'] = "Authentication options"; $string['authinstructions'] = "Here you can provide instructions for your users, so they know which username and password they should be using. The text you enter here will appear on the login page. If you leave this blank then no instructions will be printed."; $string['changepassword'] = "Change password URL"; -$string['changepasswordhelp'] = "Here you can specify a location at which your users can recover or change their username/password if they've forgotten it. This will be provided to users as a button on the login page. if you leave this blank the button will not be printed."; +$string['changepasswordhelp'] = "Here you can specify a location at which your users can recover or change their username/password if they've forgotten it. This will be provided to users as a button on the login page and their user page. if you leave this blank the button will not be printed."; $string['chooseauthmethod'] = "Choose an authentication method: "; $string['guestloginbutton'] = "Guest login button"; $string['showguestlogin'] = "You can hide or show the guest login button on the login page."; diff --git a/user/view.php b/user/view.php index e00dd38cab..00dc1cd3fe 100644 --- a/user/view.php +++ b/user/view.php @@ -121,13 +121,24 @@ echo ""; + $internalpassword = false; + if ($CFG->auth == "email" or $CFG->auth == "none") { + $internalpassword = "$CFG->wwwroot/login/change_password.php"; + } + // Print other functions echo "
"; if ($user->id == $USER->id and !isguest()) { - echo ""; + if ($CFG->auth == "email" or $CFG->auth == "none") { + echo ""; + } else if ($CFG->changepassword) { + echo ""; + } } if ((isstudent($course->id) and ($user->id == $USER->id) and !isguest()) or (isteacher($course->id) and isstudent($course->id, $user->id)) ) {

wwwroot/login/change_password.php\" METHOD=GET>"; - echo "id\">"; - echo ""; - echo "

wwwroot/login/change_password.php\" METHOD=GET>"; + echo "id\">"; + echo ""; + echo "

changepassword\" METHOD=GET>"; + echo ""; + echo "