You are here

function anonymous_publishing_pet_comment_presave in Anonymous Publishing 7

Implements hook_comment_presave().

File

modules/pet/anonymous_publishing_pet.module, line 382
Main hooks for Anonymous Publishing PET module.

Code

function anonymous_publishing_pet_comment_presave($comment) {
  if (user_is_logged_in() && isset($comment->anonymous_publishing) && $comment->anonymous_publishing['options']) {
    $comment->uid = 0;
    $comment->anonymous_publishing['originalname'] = $comment->name;
    $comment->name = _anonymous_publishing_pet_alias();
  }
}