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