init_groups_visitor() was still using old array of id output (not the newer array of hash which we need for permission queries)
This commit is contained in:
@@ -386,12 +386,12 @@ function check_form_security_token_ForbiddenOnErr($typename = '', $formname = 'f
|
||||
if(! function_exists('init_groups_visitor')) {
|
||||
function init_groups_visitor($contact_id) {
|
||||
$groups = array();
|
||||
$r = q("SELECT gid FROM group_member WHERE xchan = '%s' ",
|
||||
$r = q("SELECT hash FROM `group` left join group_member on group.id = group_member.gid WHERE xchan = '%s' ",
|
||||
dbesc($contact_id)
|
||||
);
|
||||
if(count($r)) {
|
||||
foreach($r as $rr)
|
||||
$groups[] = $rr['gid'];
|
||||
$groups[] = $rr['hash'];
|
||||
}
|
||||
return $groups;
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user