diff --git a/user/edit.php b/user/edit.php
index <HASH>..<HASH> 100644
--- a/user/edit.php
+++ b/user/edit.php
@@ -19,7 +19,7 @@
         require_login($course);
     } else if (!isloggedin()) {
         if (empty($SESSION->wantsurl)) {
-            $SESSION->wantsurl = $CFG->httpswwwroot.'/edit/user.php';
+            $SESSION->wantsurl = $CFG->httpswwwroot.'/user/edit.php';
         }
         redirect($CFG->httpswwwroot.'/login/index.php');
     }
MDL-<I> edit/user.php typo; merged from MOODLE_<I>_STABLE