Index: branches/5.3.x/units/posts/post_eh.php =================================================================== diff -u -N -r15935 -r16397 --- branches/5.3.x/units/posts/post_eh.php (.../post_eh.php) (revision 15935) +++ branches/5.3.x/units/posts/post_eh.php (.../post_eh.php) (revision 16397) @@ -1,6 +1,6 @@ Application->recallObject($parent_prefix); /* @var $main_object kCatDBItem */ - // update user posts counter - $user_posts = $this->Application->RecallPersistentVar('bb_posts'); - $this->Application->StorePersistentVar('bb_posts', $user_posts + 1); + if ( $this->Application->LoggedIn() ) { + // Update user posts counter. + $user_posts = $this->Application->RecallPersistentVar('bb_posts'); + $this->Application->StorePersistentVar('bb_posts', $user_posts + 1); + } $post_helper = $this->Application->recallObject('PostHelper'); /* @var $post_helper PostHelper */ @@ -399,6 +401,10 @@ { parent::OnAfterConfigRead($event); + if ( !$this->Application->LoggedIn() ) { + return; + } + $config = $event->getUnitConfig(); $virtual_fields = $config->getVirtualFields(); @@ -451,4 +457,4 @@ $object->SetDBField('PostingText', '[quote id=' . $reply_to . ']' . $source_post->GetDBField('PostingText') . '[/quote]'); } } - } \ No newline at end of file + }