set_moodle_cookie($USER->username);
set_login_session_preferences();
+ /// This is what lets the user do anything on the site :-)
+ load_all_capabilities();
+
//Select password change url
$userauth = get_auth_plugin($USER->auth);
if ($userauth->can_change_password()) {
reset_login_count();
- load_all_capabilities(); /// This is what lets the user do anything on the site :-)
-
redirect($urltogo);
exit;