MDL-45961 user profile: track user on reset
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 1 Jul 2014 17:19:59 +0000 (19:19 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 1 Jul 2014 17:19:59 +0000 (19:19 +0200)
It seems that redirect (after reset button) was also
missing the userid so the user track was lost.

user/profile.php

index 0d48ebd..3ac9b7a 100644 (file)
@@ -154,7 +154,7 @@ if ($PAGE->user_allowed_editing()) {
             if (!$currentpage = my_reset_page($userid, MY_PAGE_PUBLIC, 'user-profile')) {
                 print_error('reseterror', 'my');
             }
-            redirect(new moodle_url('/user/profile.php'));
+            redirect(new moodle_url('/user/profile.php', array('id' => $userid)));
         }
     } else if ($edit !== null) {             // Editing state was specified.
         $USER->editing = $edit;       // Change editing state.