Apps/Model/Api/Comments/CommentAnswerAdd.php 1 location
|
@@ 50-52 (lines=3) @@
|
| 47 |
|
public function check() |
| 48 |
|
{ |
| 49 |
|
// check if user is auth'd or guest name is defined |
| 50 |
|
if (!App::$User->isAuth() && ((int)$this->_configs['guestAdd'] !== 1 || Str::length($this->guestName) < 2)) { |
| 51 |
|
throw new JsonException(__('Guest name is not defined')); |
| 52 |
|
} |
| 53 |
|
|
| 54 |
|
// guest moderation |
| 55 |
|
if (!App::$User->isAuth() && (bool)$this->_configs['guestModerate']) { |
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)) { |