Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
0e91fc6a
Commit
0e91fc6a
authored
Nov 25, 2011
by
Francois Marier
Committed by
Gerrit Code Review
Nov 25, 2011
Browse files
Merge "Add option for an external login page (bug #885029)"
parents
eefc81cf
3720bfb7
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/auth/lib.php
View file @
0e91fc6a
...
...
@@ -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
);
redirect
(
$externallogin
);
}
if
(
$message
)
{
$SESSION
->
add_info_msg
(
$message
);
}
...
...
htdocs/lib/config-defaults.php
View file @
0e91fc6a
...
...
@@ -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 = 'http://moodle.example.com/auth/mnet/jump.php?hostwwwroot={wwwroot}&wantsurl={shorturlencoded}';
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment