I found out that the virtualgroup plugin adds the virtual groups for a user again and again and again. Check for yourself by adding a group via virtualgroup plugin and then "do=check". Reload. Reload...
Anyway: This is the patch - it just adds "array_unique" around the "array_merge" (in case the patch fails for any reason):
--- action.php 2010-01-18 06:21:48.000000000 +0100
+++ action.php 2010-01-25 09:41:12.000000000 +0100
@@ -27,7 +27,7 @@
if (!isset($this->users[$_SERVER['REMOTE_USER']])) {
return;
}
- $grps = array_merge($USERINFO['grps'],$this->users[$_SERVER['REMOTE_USER']]);
+ $grps = array_unique(array_merge($USERINFO['grps'],$this->users[$_SERVER['REMOTE_USER']]));
$USERINFO['grps'] = $grps;
$auth->info['grps'] = $grps;
$auth->users[$_SERVER['REMOTE_USER']]['grps'] = $grps;
@@ -39,7 +39,7 @@
* load the users -> group connection
*/
function _load() {
- // determein the path to the data
+ // determine the path to the data
$userFile = DOKU_INC . 'data/virtualgrp.php';
// if there is no file we hava no data ;-)
I found out that the virtualgroup plugin adds the virtual groups for a user again and again and again. Check for yourself by adding a group via virtualgroup plugin and then "do=check". Reload. Reload...
Anyway: This is the patch - it just adds "array_unique" around the "array_merge" (in case the patch fails for any reason):