@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | $this |
46 | - ->set('user', $this->Users->get($userId, ['contain' => 'Groups'])) |
|
46 | + ->set('user', $this->Users->get($userId, [ 'contain' => 'Groups' ])) |
|
47 | 47 | ->set('page_title', __d('community', 'Edit profile')); |
48 | 48 | } |
49 | 49 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | |
76 | 76 | $result = $this->Users->save($user); |
77 | 77 | if ($result) { |
78 | - EventManager::trigger('Controller.Users.successActivate', $this, ['user' => $result]); |
|
78 | + EventManager::trigger('Controller.Users.successActivate', $this, [ 'user' => $result ]); |
|
79 | 79 | $this->Flash->success(__d( |
80 | 80 | 'community', |
81 | 81 | '«{0}», you profile has been activate successfully.', |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | } |
91 | 91 | } |
92 | 92 | |
93 | - return $this->redirect(['action' => 'login']); |
|
93 | + return $this->redirect([ 'action' => 'login' ]); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | /** |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | throw new BadRequestException(__d('community', 'User was not found')); |
139 | 139 | } |
140 | 140 | |
141 | - if ($this->request->is(['patch', 'post', 'put'])) { |
|
141 | + if ($this->request->is([ 'patch', 'post', 'put' ])) { |
|
142 | 142 | $entity = $this->Users->patchEntity($user, $this->request->getData()); |
143 | 143 | if ($user->status) { |
144 | 144 | $entity->set('token', null); |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | ]); |
162 | 162 | } |
163 | 163 | |
164 | - return $this->redirect(['action' => 'login']); |
|
164 | + return $this->redirect([ 'action' => 'login' ]); |
|
165 | 165 | } else { |
166 | 166 | $this->Flash->error(__d('community', 'An error has occurred. Please, try again.')); |
167 | 167 | } |
@@ -34,21 +34,21 @@ |
||
34 | 34 | 'Community.UserEventHandler', |
35 | 35 | ], |
36 | 36 | |
37 | - 'Controller.initialize' => function (Controller $controller) { |
|
37 | + 'Controller.initialize' => function(Controller $controller) { |
|
38 | 38 | $controller->loadComponent('Community.Auth'); |
39 | 39 | if ($controller->request->getParam('prefix') === 'admin') { |
40 | 40 | $controller->loadComponent('Community.User'); |
41 | 41 | } |
42 | 42 | }, |
43 | 43 | |
44 | - 'Controller.beforeFilter' => function (Controller $controller) { |
|
44 | + 'Controller.beforeFilter' => function(Controller $controller) { |
|
45 | 45 | $user = new User((array) $controller->Auth->user()); |
46 | 46 | $controller->set('authorized', $user); |
47 | 47 | }, |
48 | 48 | |
49 | - 'View.initialize' => function (AppView $view) { |
|
49 | + 'View.initialize' => function(AppView $view) { |
|
50 | 50 | if ($view->request->getData('plugin') === 'Community') { |
51 | - $view->Html->less(['Community.styles.less'], ['block' => true, 'fullBase' => true, 'force' => true]); |
|
51 | + $view->Html->less([ 'Community.styles.less' ], [ 'block' => true, 'fullBase' => true, 'force' => true ]); |
|
52 | 52 | } |
53 | 53 | }, |
54 | 54 |