using external authentication
} 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)) {
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