Commit 283997f2 authored by Nigel McNie's avatar Nigel McNie
Browse files

Use the correct field when working out whether a user is in the internal authinstance.

The instancename field is an human-readable version of the institution
name, so can't be used for comparisons. authname is the
computer-readable one.
(cherry picked from commit 4a204353)
parent cce6a4bd
......@@ -363,7 +363,7 @@ class Institution {
$oldauth = $user->authinstance;
if (isset($authinstances[$oldauth]) && $authinstances[$oldauth]->institution == $this->name) {
foreach ($authinstances as $ai) {
if ($ai->instancename == 'internal' && $ai->institution == 'mahara') {
if ($ai->authname == 'internal' && $ai->institution == 'mahara') {
$user->authinstance = $ai->id;
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