Commit 0e91fc6a authored by Francois Marier's avatar Francois Marier Committed by Gerrit Code Review
Browse files

Merge "Add option for an external login page (bug #885029)"

parents eefc81cf 3720bfb7
......@@ -976,6 +976,13 @@ function auth_draw_login_page($message=null, Pieform $form=null) {
$externallogin = get_config('externallogin');
if ($externallogin) {
$externallogin = preg_replace('/{shorturlencoded}/', urlencode(get_relative_script_path()), $externallogin);
$externallogin = preg_replace('/{wwwroot}/', get_config('wwwroot'), $externallogin);
if ($message) {
......@@ -242,3 +242,15 @@ $cfg->leapovermnetloglevel = 0;
// This needs to be true when forcing https with an ssl proxy such as nginx.
$cfg->sslproxy = false;
// External login page
// Use this config option when you want users to be redirected to another
// login page, for example a moodle instance that has mnet to this mahara
// You can use the following placeholders:
// {wwwroot} - Expands out to the wwwroot of this moodle
// {shorturlencoded} - Expands to the relative script path of the current page (and is urlencoded)
// A point to note about the example below. Moodle doesn't strip the trailing slash from wwwroot
// Bug MDL-30042 fixes this, if this patch isn't applied, just hard code the login url you want instead
// $cfg->externallogin = '{wwwroot}&wantsurl={shorturlencoded}';
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment