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

baff’s picture

At 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.

baff’s picture

Title: Visibility Rule for Roles toggle » Visibility Rule / user NOT haveing a role
baff’s picture

Title: Visibility Rule / user NOT haveing a role » Visibility Rule / user NOT having a role