Created
May 25, 2018 09:23
-
-
Save ostearn/ee87538caecb87c36fe12185da1294c9 to your computer and use it in GitHub Desktop.
Way to stop the anoying moodle login -> redirect to edit profile page (in user/edit.php)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_once('../config.php'); | |
require_once($CFG->libdir.'/gdlib.php'); | |
require_once($CFG->dirroot.'/user/edit_form.php'); | |
require_once($CFG->dirroot.'/user/editlib.php'); | |
require_once($CFG->dirroot.'/user/profile/lib.php'); | |
require_once($CFG->dirroot.'/user/lib.php'); | |
$referer = get_local_referer(false); | |
if($referer == $CFG->httpswwwroot . '/login/index.php'){ | |
redirect(new moodle_url($CFG->httpswwwroot . '/')); | |
echo $referer; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment