Skip to content

Commit

Permalink
Merge branch 'consultas_publica' into consultas_publica_side_comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jacsonp committed Jun 12, 2017
2 parents 97c959f + 9dbca27 commit be5a722
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion delibera_notificar.php
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,12 @@ function delibera_notificar_replace_vars($subject, $user, $postReport, $admin =

if($post)
{
$author = get_user_by('id', $post->post_author);
$author = get_user_by('id', $post->post_author);
if($author === false) //is anonimous post?
{
$author = new stdClass();
$author->user_firstname = 'Anonymous';
}
$subject = str_ireplace("{post_title}", $post->post_title, $subject);
$subject = str_ireplace("{post_url}", delibera_notificar_get_mensagem_link($post), $subject);
$subject = str_ireplace("{post_author}", $author->user_firstname, $subject);
Expand Down

0 comments on commit be5a722

Please sign in to comment.