Apps/Controller/Front/Feedback.php 1 location
|
@@ 101-105 (lines=5) @@
|
98 |
|
// init new answer add model |
99 |
|
$model = new FormAnswerAdd($recordPost, $userId); |
100 |
|
// if answer is sender lets try to make it model |
101 |
|
if ($model->send() && $model->validate()) { |
102 |
|
$model->make(); |
103 |
|
App::$Session->getFlashBag()->add('success', __('Your answer was added')); |
104 |
|
$model->clearProperties(); |
105 |
|
} |
106 |
|
} |
107 |
|
|
108 |
|
// render output view |
Apps/Controller/Front/Profile/ActionAvatar.php 1 location
|
@@ 38-45 (lines=8) @@
|
35 |
|
$model = new FormAvatarUpload(true); |
36 |
|
|
37 |
|
// validate model post data |
38 |
|
if ($model->send()) { |
39 |
|
if ($model->validate()) { |
40 |
|
$model->copyFile($user); |
41 |
|
App::$Session->getFlashBag()->add('success', __('Avatar is successful changed')); |
42 |
|
} else { |
43 |
|
App::$Session->getFlashBag()->add('error', __('File upload is failed!')); |
44 |
|
} |
45 |
|
} |
46 |
|
|
47 |
|
return $this->view->render('avatar', [ |
48 |
|
'user' => $user, |
Apps/Controller/Front/Profile/ActionIgnore.php 1 location
|
@@ 49-55 (lines=7) @@
|
46 |
|
} |
47 |
|
|
48 |
|
// sended new block add? |
49 |
|
if ($model->send() && $model->validate()) { |
50 |
|
if ($model->save()) { |
51 |
|
App::$Session->getFlashBag()->add('success', __('User was successful blocked!')); |
52 |
|
} else { |
53 |
|
App::$Session->getFlashBag()->add('error', __('This user is always in ignore list')); |
54 |
|
} |
55 |
|
} |
56 |
|
|
57 |
|
// get blocked users |
58 |
|
$query = Blacklist::where('user_id', '=', $user->getId()); |
Apps/Controller/Front/Profile/ActionPassword.php 1 location
|
@@ 42-49 (lines=8) @@
|
39 |
|
$model = new FormPasswordChange($user); |
40 |
|
|
41 |
|
// check if form is submited and validation is passed |
42 |
|
if ($model->send() && $model->validate()) { |
43 |
|
$model->make(); |
44 |
|
App::$Event->run(static::EVENT_CHANGE_PASSWORD, [ |
45 |
|
'model' => $model |
46 |
|
]); |
47 |
|
|
48 |
|
App::$Session->getFlashBag()->add('success', __('Password is successful changed')); |
49 |
|
} |
50 |
|
|
51 |
|
// set response output |
52 |
|
return $this->view->render('password', [ |