Revision 546
Added by doc almost 17 years ago
class.wb.php | ||
---|---|---|
96 | 96 |
// Now check if the user has perms to view it |
97 | 97 |
$viewing_groups = explode(',', $page['viewing_groups']); |
98 | 98 |
$viewing_users = explode(',', $page['viewing_users']); |
99 |
if(is_numeric(array_search($this->get_group_id(), $viewing_groups)) OR is_numeric(array_search($this->get_user_id(), $viewing_users))) { |
|
99 |
$in_group = FALSE; |
|
100 |
foreach($this->get_groups_id() as $cur_gid){ |
|
101 |
if (in_array($cur_gid, $viewing_groups)) { |
|
102 |
$in_group = TRUE; |
|
103 |
} |
|
104 |
} |
|
105 |
if(($in_group) OR is_numeric(array_search($this->get_user_id(), $viewing_users))) { |
|
100 | 106 |
return true; |
101 | 107 |
} else { |
102 | 108 |
return false; |
... | ... | |
203 | 209 |
return $_SESSION['GROUP_ID']; |
204 | 210 |
} |
205 | 211 |
|
212 |
// Get the current users group ids |
|
213 |
function get_groups_id() { |
|
214 |
return split(",", $_SESSION['GROUPS_ID']); |
|
215 |
} |
|
216 |
|
|
206 | 217 |
// Get the current users group name |
207 | 218 |
function get_group_name() { |
219 |
return implode(",", $_SESSION['GROUP_NAME']); |
|
220 |
} |
|
221 |
|
|
222 |
// Get the current users group name |
|
223 |
function get_groups_name() { |
|
208 | 224 |
return $_SESSION['GROUP_NAME']; |
209 | 225 |
} |
210 | 226 |
|
Also available in: Unified diff
added the "users in multiple groups" feature (closes parts of ticket #546)