authzgroups : add the groupmembers by ID
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2528 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -681,6 +681,30 @@ class authzgroups
|
||||
return $res;
|
||||
}
|
||||
|
||||
/** Return an array with all the groups where the user is in and in the module
|
||||
*/
|
||||
public function groupmemberReadUserByID ($module, $idgroupmember)
|
||||
{
|
||||
if ($this->dbGroupMember == null)
|
||||
throw new Exception (dgettext ("domframework",
|
||||
"DB for GroupMember is not connected"),
|
||||
500);
|
||||
$idgrouptmps = $this->groupRead ($module);
|
||||
// Create an array with idgroup=>group
|
||||
$idgroups = array ();
|
||||
foreach ($idgrouptmps as $val)
|
||||
$idgroups[$val["idgroup"]] = $val["group"];
|
||||
$select = array ();
|
||||
$select[] = array ("idgroupmember", $idgroupmember);
|
||||
$idgroupmembers = $this->dbGroupMember->read ($select);
|
||||
$res = array ();
|
||||
foreach ($idgroupmembers as $idmembers)
|
||||
{
|
||||
$res[$idmembers["idgroup"]] = $idgroups[$idmembers["idgroup"]];
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
|
||||
/** Return an array with all the available users in the group and in the
|
||||
module */
|
||||
public function groupmemberReadGroup ($module, $group)
|
||||
|
||||
Reference in New Issue
Block a user