@@ -12,14 +12,11 @@ |
||
12 | 12 | namespace Icybee\Modules\Users\Block; |
13 | 13 | |
14 | 14 | use Brickrouge\Group; |
15 | - |
|
16 | - |
|
17 | 15 | use Brickrouge\Document; |
18 | 16 | use Brickrouge\Element; |
19 | 17 | use Brickrouge\Form; |
20 | 18 | use Brickrouge\Text; |
21 | 19 | use Brickrouge\Widget; |
22 | - |
|
23 | 20 | use Icybee\Modules\Users\Module; |
24 | 21 | use Icybee\Modules\Users\User; |
25 | 22 |
@@ -65,8 +65,8 @@ discard block |
||
65 | 65 | |
66 | 66 | Element::GROUPS => [ |
67 | 67 | |
68 | - 'connection' => [ 'title' => 'Connection' ], |
|
69 | - 'advanced' => [ 'title' => 'Advanced' ] |
|
68 | + 'connection' => ['title' => 'Connection'], |
|
69 | + 'advanced' => ['title' => 'Advanced'] |
|
70 | 70 | |
71 | 71 | ] |
72 | 72 | |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | Group::LABEL => 'language', |
173 | 173 | Element::GROUP => 'advanced', |
174 | 174 | Element::DESCRIPTION => 'language', |
175 | - Element::OPTIONS => [ null => '' ] + $languages |
|
175 | + Element::OPTIONS => [null => ''] + $languages |
|
176 | 176 | |
177 | 177 | ]), |
178 | 178 | |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | return null; |
215 | 215 | } |
216 | 216 | |
217 | - $rid = [ 2 => true ]; |
|
217 | + $rid = [2 => true]; |
|
218 | 218 | |
219 | 219 | if ($uid) |
220 | 220 | { |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | Form::LABEL => 'roles', |
237 | 237 | Element::GROUP => 'advanced', |
238 | 238 | Element::OPTIONS => $options, |
239 | - Element::OPTIONS_DISABLED => [ 2 => true ], |
|
239 | + Element::OPTIONS_DISABLED => [2 => true], |
|
240 | 240 | Element::REQUIRED => true, |
241 | 241 | Element::DESCRIPTION => 'roles', |
242 | 242 | |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | { |
256 | 256 | $values = $this->values; |
257 | 257 | |
258 | - $options = [ '<username>' ]; |
|
258 | + $options = ['<username>']; |
|
259 | 259 | |
260 | 260 | if ($values[User::USERNAME]) |
261 | 261 | { |
@@ -11,15 +11,12 @@ |
||
11 | 11 | |
12 | 12 | namespace Icybee\Modules\Users; |
13 | 13 | |
14 | -use ICanBoogie\Operation; |
|
15 | - |
|
16 | 14 | use Brickrouge\A; |
17 | 15 | use Brickrouge\Button; |
18 | 16 | use Brickrouge\Document; |
19 | 17 | use Brickrouge\Element; |
20 | 18 | use Brickrouge\Form; |
21 | 19 | use Brickrouge\Text; |
22 | - |
|
23 | 20 | use Icybee\Binding\Core\PrototypedBindings; |
24 | 21 | |
25 | 22 | class LoginForm extends Form |
@@ -50,7 +50,7 @@ |
||
50 | 50 | { |
51 | 51 | $app = $this->app; |
52 | 52 | |
53 | - $this->lost_password = new A($this->t('lost_password', [], [ 'scope' => 'users.label', 'default' => 'I forgot my password' ]), "#lost-password", [ |
|
53 | + $this->lost_password = new A($this->t('lost_password', [], ['scope' => 'users.label', 'default' => 'I forgot my password']), "#lost-password", [ |
|
54 | 54 | |
55 | 55 | 'rel' => 'nonce-request' |
56 | 56 |
@@ -11,9 +11,7 @@ |
||
11 | 11 | |
12 | 12 | namespace Icybee\Modules\Users; |
13 | 13 | |
14 | -use ICanBoogie\I18n; |
|
15 | 14 | use ICanBoogie\Operation; |
16 | - |
|
17 | 15 | use Brickrouge\Button; |
18 | 16 | use Brickrouge\Element; |
19 | 17 | use Brickrouge\Form; |
@@ -81,7 +81,7 @@ |
||
81 | 81 | |
82 | 82 | Element::CHILDREN => [ |
83 | 83 | |
84 | - new Button('logout', [ 'type' => 'submit' ]) |
|
84 | + new Button('logout', ['type' => 'submit']) |
|
85 | 85 | |
86 | 86 | ] |
87 | 87 |
@@ -12,11 +12,9 @@ |
||
12 | 12 | namespace Icybee\Modules\Users\Operation; |
13 | 13 | |
14 | 14 | use ICanBoogie\Errors; |
15 | -use ICanBoogie\HTTP\Request; |
|
16 | 15 | use ICanBoogie\I18n; |
17 | 16 | use ICanBoogie\Operation; |
18 | 17 | use ICanBoogie\Module\ControllerBindings as ModuleBindings; |
19 | - |
|
20 | 18 | use Icybee\Binding\Core\PrototypedBindings; |
21 | 19 | use Icybee\Modules\Registry\MetaCollection; |
22 | 20 | use Icybee\Modules\Users\LoginForm; |
@@ -146,7 +146,7 @@ |
||
146 | 146 | attack attempt on the website. If you think this is the case, please contact its admin. |
147 | 147 | |
148 | 148 | The remote address of the request was: $request->ip. |
149 | -EOT |
|
149 | +eot |
|
150 | 150 | ]); |
151 | 151 | |
152 | 152 | unset($errors[User::PASSWORD]); |
@@ -91,8 +91,7 @@ discard block |
||
91 | 91 | { |
92 | 92 | if ($login_unlock_time > $now) |
93 | 93 | { |
94 | - throw new \Exception |
|
95 | - ( |
|
94 | + throw new \Exception( |
|
96 | 95 | \ICanBoogie\format("The user account has been locked after multiple failed login attempts. |
97 | 96 | An e-mail has been sent to unlock the account. Login attempts are locked until %time, |
98 | 97 | unless you unlock the account using the email sent.", [ |
@@ -168,7 +167,7 @@ discard block |
||
168 | 167 | |
169 | 168 | if (!$user->is_admin && !$user->is_activated) |
170 | 169 | { |
171 | - $errors->add_generic("User %username is not activated", [ '%username' => $username ]); |
|
170 | + $errors->add_generic("User %username is not activated", ['%username' => $username]); |
|
172 | 171 | |
173 | 172 | return false; |
174 | 173 | } |
@@ -13,7 +13,6 @@ |
||
13 | 13 | |
14 | 14 | use ICanBoogie\Errors; |
15 | 15 | use ICanBoogie\Operation; |
16 | - |
|
17 | 16 | use Icybee\Modules\Users\User; |
18 | 17 | |
19 | 18 | /** |
@@ -14,11 +14,9 @@ |
||
14 | 14 | use ICanBoogie\ActiveRecord; |
15 | 15 | use ICanBoogie\ActiveRecord\CreatedAtProperty; |
16 | 16 | use ICanBoogie\ActiveRecord\RecordNotFound; |
17 | - |
|
18 | 17 | use Brickrouge\AlterCSSClassNamesEvent; |
19 | 18 | use Brickrouge\CSSClassNames; |
20 | 19 | use Brickrouge\CSSClassNamesProperty; |
21 | - |
|
22 | 20 | use Icybee\Modules\Users\Roles\Role; |
23 | 21 | use Icybee\Binding\Core\PrototypedBindings as IcybeeBindings; |
24 | 22 | use Icybee\Modules\Registry\Binding\UserBindings as RegistryBindings; |
@@ -12,8 +12,6 @@ |
||
12 | 12 | namespace Icybee\Modules\Users; |
13 | 13 | |
14 | 14 | use ICanBoogie\DateTime; |
15 | -use ICanBoogie\ActiveRecord; |
|
16 | - |
|
17 | 15 | use Icybee\ConstructorModel; |
18 | 16 | |
19 | 17 | class UserModel extends ConstructorModel |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | continue; |
74 | 74 | } |
75 | 75 | |
76 | - $has_many_roles->execute('INSERT {self} SET uid = ?, rid = ?', [ $rc, $rid ]); |
|
76 | + $has_many_roles->execute('INSERT {self} SET uid = ?, rid = ?', [$rc, $rid]); |
|
77 | 77 | } |
78 | 78 | } |
79 | 79 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | foreach ($restricted_sites as $site_id) |
90 | 90 | { |
91 | - $has_many_sites->execute('INSERT {self} SET uid = ?, site_id = ?', [ $rc, $site_id ]); |
|
91 | + $has_many_sites->execute('INSERT {self} SET uid = ?, site_id = ?', [$rc, $site_id]); |
|
92 | 92 | } |
93 | 93 | } |
94 | 94 | } |
@@ -9,7 +9,7 @@ |
||
9 | 9 | |
10 | 10 | return [ |
11 | 11 | |
12 | - ICanBoogie\HTTP\AuthenticationRequired::class .'::rescue' => $hooks . 'on_security_exception_rescue', |
|
12 | + ICanBoogie\HTTP\AuthenticationRequired::class . '::rescue' => $hooks . 'on_security_exception_rescue', |
|
13 | 13 | ICanBoogie\HTTP\PermissionRequired::class . '::rescue' => $hooks . 'on_security_exception_rescue', |
14 | 14 | ICanBoogie\Routing\RouteDispatcher::class . '::dispatch:before' => $hooks . 'before_routing_dispatcher_dispatch', |
15 | 15 | Icybee\Modules\Users\Roles\Operation\DeleteOperation::class . '::process:before' => $hooks . 'before_roles_delete', |
@@ -11,8 +11,8 @@ |
||
11 | 11 | |
12 | 12 | 'patron.markups' => [ |
13 | 13 | |
14 | - 'user' => [ $hooks . 'markup_user' ], |
|
15 | - 'users:form:login' => [ $hooks . 'markup_form_login' ] |
|
14 | + 'user' => [$hooks . 'markup_user'], |
|
15 | + 'users:form:login' => [$hooks . 'markup_form_login'] |
|
16 | 16 | |
17 | 17 | ] |
18 | 18 |