]> git.mjollnir.org Git - moodle.git/commitdiff
multiauth: fix for calling new properties and methods correctly
authorjmg324 <jmg324>
Fri, 12 Jan 2007 10:33:12 +0000 (10:33 +0000)
committerjmg324 <jmg324>
Fri, 12 Jan 2007 10:33:12 +0000 (10:33 +0000)
login/change_password.php
login/forgot_password.php

index 00b6e8f69e5571dd9934a11d1613546ad1be3d63..dc280e929db1153aacdb6fd5d8b26743ef5f0e4d 100644 (file)
@@ -57,9 +57,9 @@
         // load the appropriate auth plugin
         $userauth = get_auth_plugin($user->auth);
         if ($userauth->can_change_password()){
-            if ($userauth->user_update_password($user, $data->newpassword1)) {
+            if ($userauth->user_update_password($user->username, $data->newpassword1)) {
                 // hash the $user->password field (without local db update)
-                update_internal_user_password($user, $frm->newpassword1, false);
+                update_internal_user_password($user, $data->newpassword1, false);
             } else {
                 error('Could not set the new password');
             }
index aacf5db714417cacb7874811064330922216d477..85b3116bddbe7bd6021898da013f33774135e338 100644 (file)
@@ -137,7 +137,7 @@ if ($action == 'find' and $param = $mform->data_submitted()) {
                 // if url defined then add that to the message (with a standard message)
                 if (method_exists($userauth, 'change_password_url') and $userauth->change_password_url()) {
                     $strextmessage .= $strpasswordextlink . '<br /><br />';
-                    $txt->extmessage .= '<a href="' . $userauth->change_password_url() . '">' . $userauth->change_password_url() . '</a>';
+                    $strextmessage .= '<a href="' . $userauth->change_password_url() . '">' . $userauth->change_password_url() . '</a>';
                 }
                 // if nothing to display, just do message that we can't help
                 if (empty($strextmessage)) {
@@ -265,12 +265,12 @@ if ($page == 'emailconfirm') {
 
 }
 
-echo $strforgotteninstruct;
-
+if(!$mform->data_submitted()) {
+    echo $strforgotteninstruct;
+    $mform->display();
+}
 print_simple_box_end();
 
-$mform->display();
-
 print_footer();
 
-?>
+?>
\ No newline at end of file