Skip to content

Commit

Permalink
Respect login redirection on confirm of email-based self signup (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
grillonbleu authored Sep 18, 2024
1 parent fd712d7 commit 02bec22
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
15 changes: 15 additions & 0 deletions lib.php
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;
}
}
6 changes: 3 additions & 3 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

defined('MOODLE_INTERNAL') || die;

$plugin->version = 2020082500; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2014051200; // Requires this Moodle version
$plugin->version = 2024081700; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2018051700; // Requires this Moodle version
$plugin->component = 'auth_loginlogoutredir'; // Full name of the plugin (used for diagnostics)
$plugin->maturity = MATURITY_RC;
$plugin->release = '1.0.1 (2020082500)';
$plugin->release = '1.0.2 (2024081700)';

0 comments on commit 02bec22

Please sign in to comment.