function granted2update_group($usrgrpids) { global $USER_DETAILS; zbx_value2array($usrgrpids); $users = get_userid_by_usrgrpid($usrgrpids); $result = !uint_in_array($USER_DETAILS['userid'], $users); return $result; }
/** * Check if group has permissions for update. * * @param array $userGroupIds * * @return bool */ function granted2update_group($userGroupIds) { zbx_value2array($userGroupIds); $users = get_userid_by_usrgrpid($userGroupIds); return !isset($users[CWebUser::$data['userid']]); }