Skip to content
Snippets Groups Projects
Commit 971d5e88 authored by Andrea Biancini's avatar Andrea Biancini
Browse files

Fixed process to remove users from abondoned groups

parent 536484ce
No related branches found
No related tags found
No related merge requests found
...@@ -470,6 +470,11 @@ function ShibAddGroups($user) { ...@@ -470,6 +470,11 @@ function ShibAddGroups($user) {
global $shib_groups; global $shib_groups;
global $shib_group_prefix; global $shib_group_prefix;
$oldGroups = $user->getGroups();
foreach ($oldGroups as $group) {
$user->removeGroup($group);
}
if (isset($shib_groups)) { if (isset($shib_groups)) {
foreach (explode(';', $shib_groups) as $group) { foreach (explode(';', $shib_groups) as $group) {
if (isset($shib_group_prefix) && !empty($shib_group_prefix)) { if (isset($shib_group_prefix) && !empty($shib_group_prefix)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment