-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Respect login redirection on confirm of email-based self signup (#10)
- Loading branch information
1 parent
fd712d7
commit 02bec22
Showing
2 changed files
with
18 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
defined('MOODLE_INTERNAL') || die(); | ||
|
||
/** | ||
* Called when a signup form is about to be rendered. If a login redirection URL is configured then bring the user to | ||
* said URL once they have signed up and confirmed their account. | ||
*/ | ||
function auth_loginlogoutredir_pre_signup_requests() { | ||
global $SESSION, $CFG; | ||
|
||
if (isset($CFG->loginredir)) { | ||
$SESSION->wantsurl = $CFG->loginredir; | ||
} | ||
} |
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