Add an option for an external login page

Bug #885029 reported by Hugh Davenport
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Hugh Davenport

Bug Description

When there is another application that is linked to mahara via some SSO, it is sometimes wanted to not use the mahara login page.

This feature adds a new config option externallogin which specifies a page that will log the user in to the application somehow.

A common example of this would be when you have a Moodle and a Mahara, and there are no local Mahara users (only mnet ones via the Moodle).
For this, we could have a config option such as

$cfg->externallogin = '{wwwroot}&wantsurl={shorturlencoded}';

That would then redirect a user from a page requiring login to the moodle login page, then redirect them back! Exciting!

A note about that example config option, the wwwroot in mahara uses a trailing slash, but moodle incorrectly doesn't trim it (even though it trims it when adding the peer). See MDL-30042 (

Revision history for this message
Hugh Davenport (hugh-davenport) wrote :
Changed in mahara:
status: New → In Progress
importance: Undecided → Wishlist
assignee: nobody → Hugh Davenport (hugh-catalyst)
milestone: none → 1.5.0
Revision history for this message
Hugh Davenport (hugh-davenport) wrote :
tags: added: login mnet
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Submitter: Francois Marier (<email address hidden>)
Branch: master

commit 3720bfb7ef80b3090bc4799f391c917ff0c6c74c
Author: Hugh Davenport <email address hidden>
Date: Wed Nov 2 14:29:04 2011 +1300

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

    This patch adds a new feature allowing an administrator to set
    a new config option externallogin, which redirects any page view
    requiring login to this external login page.

    The config option allows some placeholders. For examples, see

    Change-Id: I4a3277222c35bfed11e4af597fa54ef82ea866ae
    Signed-off-by: Hugh Davenport <email address hidden>

Changed in mahara:
status: In Progress → Fix Committed
tags: added: newfeature
Revision history for this message
Melissa Draper (melissa) wrote :

Hash: SHA1

 status fixreleased
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla -


Changed in mahara:
status: Fix Committed → Fix Released
Revision history for this message
Sam Hegarty (sjhegarty) wrote :

A fantastic feature - but I can't see it anywhere as an Administrator. Where do you access the config option externallogin to allow this to happen?

Revision history for this message
Hugh Davenport (hugh-davenport) wrote :

Hi Sam,

Currently it is only accessible via the config.php file. If you have a look in lib/config-defaults.php, there will be a commented section with examples.

If you would like to see it in the administration site settings area, feel free to file a new bug.



To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.