Apps/Model/Api/Comments/CommentPostAdd.php 1 location
|
@@ 60-62 (lines=3) @@
|
57 |
|
public function check() |
58 |
|
{ |
59 |
|
// check if user is auth'd or guest name is defined |
60 |
|
if (!App::$User->isAuth() && ((int)$this->_configs['guestAdd'] !== 1 || Str::length($this->guestName) < 2)) { |
61 |
|
throw new JsonException(__('Guest name is not defined')); |
62 |
|
} |
63 |
|
|
64 |
|
// check if pathway is empty |
65 |
|
if (Str::likeEmpty($this->pathway)) { |
Apps/Model/Api/Comments/CommentAnswerAdd.php 1 location
|
@@ 52-54 (lines=3) @@
|
49 |
|
public function check() |
50 |
|
{ |
51 |
|
// check if user is auth'd or guest name is defined |
52 |
|
if (!App::$User->isAuth() && ((int)$this->_configs['guestAdd'] !== 1 || Str::length($this->guestName) < 2)) { |
53 |
|
throw new JsonException(__('Guest name is not defined')); |
54 |
|
} |
55 |
|
|
56 |
|
// guest moderation |
57 |
|
if (!App::$User->isAuth() && (bool)$this->_configs['guestModerate']) { |