diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 7d96ddd0b36..7c30e73e8a3 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 27a43bee595..044e43c3e96 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