From b7c3bb218229857125b76b278be2c0fb19734cae Mon Sep 17 00:00:00 2001 From: skodak Date: Thu, 15 Feb 2007 20:46:39 +0000 Subject: [PATCH] fixed problem on user edit page when user not fully setup --- login/index.php | 2 +- user/edit.php | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/login/index.php b/login/index.php index 4e08b823d7..579d86b742 100644 --- a/login/index.php +++ b/login/index.php @@ -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.'&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)) { diff --git a/user/edit.php b/user/edit.php index 4c49b9534f..21285c0086 100644 --- a/user/edit.php +++ b/user/edit.php @@ -17,13 +17,10 @@ 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()) { -- 2.39.5