Apps/Controller/Front/Feedback.php 1 location
|
@@ 44-46 (lines=3) @@
|
41 |
|
{ |
42 |
|
// get configs |
43 |
|
$configs = $this->getConfigs(); |
44 |
|
if (!App::$User->isAuth() && (int)$configs['guestAdd'] !== 1) { |
45 |
|
throw new ForbiddenException(__('Feedback available only for authorized users')); |
46 |
|
} |
47 |
|
|
48 |
|
// initialize model |
49 |
|
$model = new FormFeedbackAdd((int)$configs['useCaptcha'] === 1); |
Apps/Controller/Front/Profile.php 1 location
|
@@ 125-127 (lines=3) @@
|
122 |
|
public function actionShow($userId) |
123 |
|
{ |
124 |
|
$cfg = Serialize::decode($this->application->configs); |
125 |
|
if ((int)$cfg['guestView'] !== 1 && !App::$User->isAuth()) { |
126 |
|
throw new ForbiddenException(__('You must login to view other profile')); |
127 |
|
} |
128 |
|
// check if target exists |
129 |
|
if (!App::$User->isExist($userId)) { |
130 |
|
throw new NotFoundException(__('This profile is not exist')); |