Completed
Push — master ( a3d311...211d79 )
by Cheren
02:09
created
src/Controller/Component/AuthComponent.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
             'authenticate' => [
60 60
                 'Form' => [
61 61
                     'userModel' => 'Users',
62
-                    'scope'     => ['Users.status' => 1],
62
+                    'scope'     => [ 'Users.status' => 1 ],
63 63
                     'fields'    => [
64 64
                         'username' => 'login',
65 65
                         'password' => 'password'
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
             'flash' => [
70 70
                 'key'       => 'auth',
71 71
                 'element'   => 'error',
72
-                'params'    => ['class' => 'error']
72
+                'params'    => [ 'class' => 'error' ]
73 73
             ],
74 74
             'loginAction' => [
75 75
                 'controller' => 'Users',
@@ -81,16 +81,16 @@  discard block
 block discarded – undo
81 81
                 'controller' => 'Users',
82 82
                 'plugin'     => 'Community'
83 83
             ],
84
-            'authorize'      => ['Community.Base'],
84
+            'authorize'      => [ 'Community.Base' ],
85 85
             'loginRedirect'  => $this->_getLoginRedirect(),
86
-            'logoutRedirect' => $this->_config['loginAction'],
86
+            'logoutRedirect' => $this->_config[ 'loginAction' ],
87 87
             'authError'      => __d('community', 'You are not authorized to access that location.')
88 88
         ];
89 89
 
90 90
         $config = $this->getConfig();
91 91
         foreach ($config as $key => $value) {
92 92
             if ($value !== null) {
93
-                unset($defaults[$key]);
93
+                unset($defaults[ $key ]);
94 94
             }
95 95
         }
96 96
 
Please login to merge, or discard this patch.
plugin.manifest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,14 +34,14 @@
 block discarded – undo
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
     },
Please login to merge, or discard this patch.