function _antispam_is_moderator in AntiSpam 6
Same name and namespace in other branches
- 7 antispam.module \_antispam_is_moderator()
1 call to _antispam_is_moderator()
1 string reference to '_antispam_is_moderator'
- antispam_menu in ./
antispam.module - Implementation of hook_menu().
File
- ./
antispam.module, line 382
Code
function _antispam_is_moderator($moderator_types = array(), $type = '') {
global $user;
if ($user->uid == 1) {
return TRUE;
// admin
}
if (empty($moderator_types)) {
$moderator_types = antispam_get_moderator_types();
}
if (_antispam_moderator_types_count($moderator_types) > 0 && (empty($type) || isset($moderator_types[$type]))) {
return TRUE;
}
else {
return FALSE;
}
}