function spam_mark_user_as_spam_action in Spam 6
Implementation of a Drupal action. Mark user as spam.
File
- content/
spam_content_user.inc, line 260 - Include file for integration with the user system.
Code
function spam_mark_user_as_spam_action(&$object, $context = array()) {
// get the uid from the object
if (isset($object->uid)) {
$uid = $object->uid;
}
elseif (isset($context['uid'])) {
$uid = $context['uid'];
}
// make sure we have a user record
if ($uid) {
spam_mark_as_spam('user', $uid);
// record a message noting the action taken
watchdog('action', 'Marked user %uid as not spam.', array(
'%uid' => $uid,
));
}
}