From 2c104c01523ea5d674c05192c2ac156ba02dc7ab Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 14 Jan 2003 14:54:45 +0000 Subject: [PATCH] Fixed redirection when user not completed yet in some instances when using external authentication --- lib/moodlelib.php | 5 ----- user/edit.php | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 7d96ddd0b3..7c30e73e8a 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -301,11 +301,6 @@ function require_login($courseid=0) { } else { // just update their last login time update_user_in_db(); } - if (!$USER->email) { // User logged in, but has not set up profile! - // This can occur with external authentication - redirect("$CFG->wwwroot/user/edit.php?id=$USER->id&course=$courseid"); - die; - } return; // user is a member of this course. } if (! $course = get_record("course", "id", $courseid)) { diff --git a/user/edit.php b/user/edit.php index 27a43bee59..044e43c3e9 100644 --- a/user/edit.php +++ b/user/edit.php @@ -15,7 +15,7 @@ error("Course ID was incorrect"); } - if ($user->confirmed and !$user->email) { + if ($user->confirmed and user_not_fully_set_up($user)) { // Special case which can only occur when a new account // has just been created by EXTERNAL authentication // This is the only page in Moodle that has the exception -- 2.39.5