Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

Set user id to 0 if anonymous comment

givanz1322d08cdc52
diff --git a/app/controller/content/comment-trait.php b/app/controller/content/comment-trait.php
old mode 100755
new mode 100644
index 102072e..ce74ff4
--- a/app/controller/content/comment-trait.php
+++ b/app/controller/content/comment-trait.php
@@ -61,7 +61,7 @@ trait CommentTrait {
'notSpam' => $notSpam,
'commentType' => $commentType,
'commentName' => $commentName,
- 'user_id' => $user['user_id'],
+ 'user_id' => $user['user_id'] ?? false,
]);
list($comment) = Event :: trigger(__CLASS__, __FUNCTION__ , $comment);