function spam_mark_user_as_not_spam_action in Spam 6
Implementation of a Drupal action. Mark user as not spam.
File
- content/
spam_content_user.inc, line 280  - Include file for integration with the user system.
 
Code
function spam_mark_user_as_not_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 comment record
  if ($uid) {
    spam_mark_as_not_spam('user', $uid);
    // record a message noting the action taken
    watchdog('action', 'Marked user %uid as not spam.', array(
      '%uid' => $uid,
    ));
  }
}