@@ -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 | |
@@ -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 | |
@@ -290,7 +290,7 @@ |
||
| 290 | 290 | { |
| 291 | 291 | $record = $this->record; |
| 292 | 292 | |
| 293 | - $this->response->message = $this->format($rc['mode'] == 'update' ? "%name's profile has been updated." : "%name's profile has been created.", [ 'name' => $record->name ]); |
|
| 293 | + $this->response->message = $this->format($rc['mode'] == 'update' ? "%name's profile has been updated." : "%name's profile has been created.", ['name' => $record->name]); |
|
| 294 | 294 | } |
| 295 | 295 | |
| 296 | 296 | return $rc; |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | |
| 35 | 35 | foreach ($fragment['permission_resolver_list'] as $resolver_id => $resolver) |
| 36 | 36 | { |
| 37 | - $resolver = ((array) $resolver) + [ 'weight' => 0 ]; |
|
| 37 | + $resolver = ((array) $resolver) + ['weight' => 0]; |
|
| 38 | 38 | |
| 39 | 39 | $list[$resolver_id] = $resolver[0]; |
| 40 | 40 | $weight[$resolver_id] = $resolver['weight']; |
@@ -355,7 +355,7 @@ |
||
| 355 | 355 | { |
| 356 | 356 | if (!$this->uid) |
| 357 | 357 | { |
| 358 | - return [ $models['users.roles'][1] ]; |
|
| 358 | + return [$models['users.roles'][1]]; |
|
| 359 | 359 | } |
| 360 | 360 | } |
| 361 | 361 | catch (\Exception $e) |
@@ -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 | } |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | |
| 35 | 35 | foreach ($fragment['permission_resolver_list'] as $resolver_id => $resolver) |
| 36 | 36 | { |
| 37 | - $resolver = ((array) $resolver) + [ 'weight' => 0 ]; |
|
| 37 | + $resolver = ((array) $resolver) + ['weight' => 0]; |
|
| 38 | 38 | |
| 39 | 39 | $list[$resolver_id] = $resolver[0]; |
| 40 | 40 | $weight[$resolver_id] = $resolver['weight']; |
@@ -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 | } |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | ->models['users'] |
| 106 | 106 | ->select("uid, firstname AS {$prefix}firstname, lastname AS {$prefix}lastname"); |
| 107 | 107 | |
| 108 | - return $query->join($user_query, [ 'on' => 'uid', 'mode' => 'LEFT', 'as' => $prefix ]); |
|
| 108 | + return $query->join($user_query, ['on' => 'uid', 'mode' => 'LEFT', 'as' => $prefix]); |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | public function alter_query_with_value(Query $query, $value) |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | |
| 115 | 115 | if ($value) |
| 116 | 116 | { |
| 117 | - $query->and([ $this->id => $value ]); |
|
| 117 | + $query->and([$this->id => $value]); |
|
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | return $query; |