1
I noticed that when an admin user adds a group through the users admin module, the original code uses the XOOPS_GROUP_USERS in the add group function. I tried changing that to the $groups variable, but it does not accept multiple selections for groups. I added a foreach loop like the one in the updateUser function but it still doesnt not work.
/modules/admin/users/main.php
--original--
if (!$member_handler->addUserToGroup(XOOPS_GROUP_USERS, $newuser->getVar('uid'))) {
$adduser_errormsg = _AM_CNRNU2;
} else {
redirect_header("admin.php?fct=users",1,_AM_DBUPDATED);
exit();
}
--my hack--
foreach ($groups as $groupid) {
if (!$member_handler->addUserToGroup($groupid,
$newuser->getVar('uid'))) {
$adduser_errormsg = _AM_CNRNU2;
} else {
redirect_header("admin.php?fct=users",1,_AM_DBUPDATED);
exit();
}
}