Active
Project:
OG Panels
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 Aug 2010 at 15:19 UTC
Updated:
6 Sep 2010 at 09:00 UTC
Would it be possible to add a toggle checkbox for roles which means that you can either state only visible for role A or when checkbox is checked a logic negation is made which means NOT visible for role A
Comments
Comment #1
baff commentedAt the moment I am using the following php code to check if a user has NOT the role 'Clubmitglied':
global $user;
$tmp = 0;
$result = db_query('SELECT r.rid, r.name FROM {role} r INNER JOIN {users_roles} ur ON ur.rid = r.rid WHERE ur.uid = %d', $user->uid);
while ($role = db_fetch_object($result)) {
if (($role->name) == 'Clubmitglied') {
$tmp = 1;
}
}
if ($tmp != 1) {
return TRUE;
}
With this visibility rule I can check if a user has NOT a role.
Comment #2
baff commentedComment #3
baff commented