Skip to content

Commit

Permalink
Bugfix: GroupMap for new users
Browse files Browse the repository at this point in the history
  • Loading branch information
northway committed Sep 21, 2019
1 parent 41bcfd2 commit 3f78cb0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,3 @@ Shibboleth Single Logout (SLO) URL structure
`$wgShibboleth_Logout_Base_Url . Shibboleth.sso/Logout?return= . $wgShibboleth_Logout_Target_Url`

`https://wiki.example.org/Shibboleth.sso/Logout?return=https://wiki.example.org/index.php`

## Known Bugs

The very first time when the user authenticates with Shibboleth, **$wgShibboleth_GroupMap** does not take effect due [T184736](https://phabricator.wikimedia.org/T184736) bug. It requires a relogin (logout then login) to be able to map the given configuration.
7 changes: 7 additions & 0 deletions Shibboleth.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ public function authenticate(&$id, &$username, &$realname, &$email, &$errorMessa
$this->checkGroupMap();
}

$user = User::newFromName($username);
$temporaryUserId = $user->getId();

if ($temporaryUserId !== 0) {
$id = $mId;
}

return true;
}

Expand Down

0 comments on commit 3f78cb0

Please sign in to comment.