Completed
Push — master ( 49e473...a3d311 )
by Cheren
03:12
created
src/Controller/Admin/UsersController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
                     $result->get('login')
56 56
                 )));
57 57
 
58
-                return $this->App->redirect(['apply' => ['action' => 'edit', $result->id]]);
58
+                return $this->App->redirect([ 'apply' => [ 'action' => 'edit', $result->id ] ]);
59 59
             } else {
60 60
                 $this->Flash->error(__d('community', 'User could not be updated. Please, try again.'));
61 61
             }
@@ -76,14 +76,14 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function changePassword($id = null)
78 78
     {
79
-        $user = $this->Users->get($id, ['contain' => []]);
79
+        $user = $this->Users->get($id, [ 'contain' => [ ] ]);
80 80
         $user->set('password', null);
81 81
 
82
-        if ($this->request->is(['patch', 'post', 'put'])) {
82
+        if ($this->request->is([ 'patch', 'post', 'put' ])) {
83 83
             $user = $this->Users->patchEntity($user, $this->request->getData());
84 84
             if ($result = $this->Users->save($user)) {
85 85
                 $this->Flash->success(__d('community', 'Password has been updated.'));
86
-                return $this->App->redirect(['apply' => ['action' => 'edit', $result->id]]);
86
+                return $this->App->redirect([ 'apply' => [ 'action' => 'edit', $result->id ] ]);
87 87
             } else {
88 88
                 $this->Flash->error(__d('community', 'Password could not be updated. Please, try again.'));
89 89
             }
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         $user = $this->Users->get($id);
111 111
         $groups = $this->Users->Groups->getTreeList();
112 112
 
113
-        if ($this->request->is(['patch', 'post', 'put'])) {
113
+        if ($this->request->is([ 'patch', 'post', 'put' ])) {
114 114
             $user = $this->Users->patchEntity($user, $this->request->getData());
115 115
             if ($result = $this->Users->save($user)) {
116 116
                 $this->Flash->success(__d('community', 'The user {0} has been saved.', sprintf(
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
                     $result->get('login')
119 119
                 )));
120 120
                 return $this->App->redirect([
121
-                    'apply' => ['action' => 'edit', $result->id]
121
+                    'apply' => [ 'action' => 'edit', $result->id ]
122 122
                 ]);
123 123
             } else {
124 124
                 $this->Flash->error(__d('community', 'User could not be updated. Please, try again.'));
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
     public function initialize()
159 159
     {
160 160
         parent::initialize();
161
-        $this->Security->setConfig('unlockedFields', ['password', 'password_confirm']);
161
+        $this->Security->setConfig('unlockedFields', [ 'password', 'password_confirm' ]);
162 162
     }
163 163
 
164 164
     /**
Please login to merge, or discard this patch.