]> git.mjollnir.org Git - moodle.git/commitdiff
fixed problem on user edit page when user not fully setup
authorskodak <skodak>
Thu, 15 Feb 2007 20:46:39 +0000 (20:46 +0000)
committerskodak <skodak>
Thu, 15 Feb 2007 20:46:39 +0000 (20:46 +0000)
login/index.php
user/edit.php

index 4e08b823d75d7dc866e7b6d35578f93d5e66a755..579d86b742295ba8e3a4c50b58136bb9ca46c83c 100644 (file)
@@ -177,7 +177,7 @@ if ($authsequence[0] == 'cas' and !empty($CFG->cas_enabled)) {
 
           /// Prepare redirection
             if (user_not_fully_set_up($USER)) {
-                $urltogo = $CFG->wwwroot.'/user/edit.php?id='.$USER->id.'&amp;course='.SITEID;
+                $urltogo = $CFG->wwwroot.'/user/edit.php';
                 // We don't delete $SESSION->wantsurl yet, so we get there later
 
             } else if (isset($SESSION->wantsurl) and (strpos($SESSION->wantsurl, $CFG->wwwroot) === 0)) {
index 4c49b9534fda7a8c2782124ba0dc812017f622b4..21285c0086e87249b7e5798cef1dc3a4a76108bf 100644 (file)
     if ($course->id != SITEID) {
         require_login($course);
     } else if (!isloggedin()) {
-        // user might not be fully setup, do not use require login here!
-        if (empty($CFG->loginhttps)) {
-            redirect($CFG->wwwroot .'/login/index.php');
-        } else {
-            $wwwroot = str_replace('http:','https:', $CFG->wwwroot);
-            redirect($wwwroot .'/login/index.php');
+        if (empty($SESSION->wantsurl)) {
+            $SESSION->wantsurl = $CFG->httpswwwroot.'/edit/user.php';
         }
+        redirect($CFG->httpswwwroot.'/login/index.php');
     }
 
     if (isguestuser()) {