@@ -228,7 +228,7 @@ |
||
228 | 228 | 'style' => Validator::parsedBody($request)->isInArrayKeys($this->styles())->integer('style'), |
229 | 229 | 'width' => Validator::parsedBody($request)->isBetween(self::MINIMUM_WIDTH, self::MAXIMUM_WIDTH)->integer('width'), |
230 | 230 | 'xref' => Validator::parsedBody($request)->isXref()->string('xref'), |
231 | - ])); |
|
231 | + ])); |
|
232 | 232 | } |
233 | 233 | |
234 | 234 | Auth::checkComponentAccess($this, ModuleChartInterface::class, $tree, $user); |
@@ -3,19 +3,19 @@ |
||
3 | 3 | declare(strict_types=1); |
4 | 4 | |
5 | 5 | return array ( |
6 | - '%H:%i:%s' => '%g:%i:%s %a', |
|
7 | - '%j %F %Y' => '%F %j, %Y', |
|
8 | - 'Asunción, Paraguay' => 'Asuncion, Paraguay', |
|
9 | - 'Bogotá, Colombia' => 'Bogota, Colombia', |
|
10 | - 'Ciudad Juárez, Mexico' => 'Ciudad Juarez, Mexico', |
|
11 | - 'Colonia Juárez, Mexico' => 'Colonia Juarez, Mexico', |
|
12 | - 'Curaçao' => 'Curacao', |
|
13 | - 'Córdoba, Argentina' => 'Cordoba, Argentina', |
|
14 | - 'Côte d’Ivoire' => 'Cote d’Ivoire', |
|
15 | - 'Réunion' => 'Reunion', |
|
16 | - 'Saint Barthélemy' => 'Saint Barthelemy', |
|
17 | - 'San José, Costa Rica' => 'San Jose, Costa Rica', |
|
18 | - 'São Paulo, Brazil' => 'Sao Paulo, Brazil', |
|
19 | - 'Tuxtla Gutiérrez, Mexico' => 'Tuxtla Gutierrez, Mexico', |
|
20 | - 'Åland Islands' => 'Aland Islands', |
|
6 | + '%H:%i:%s' => '%g:%i:%s %a', |
|
7 | + '%j %F %Y' => '%F %j, %Y', |
|
8 | + 'Asunción, Paraguay' => 'Asuncion, Paraguay', |
|
9 | + 'Bogotá, Colombia' => 'Bogota, Colombia', |
|
10 | + 'Ciudad Juárez, Mexico' => 'Ciudad Juarez, Mexico', |
|
11 | + 'Colonia Juárez, Mexico' => 'Colonia Juarez, Mexico', |
|
12 | + 'Curaçao' => 'Curacao', |
|
13 | + 'Córdoba, Argentina' => 'Cordoba, Argentina', |
|
14 | + 'Côte d’Ivoire' => 'Cote d’Ivoire', |
|
15 | + 'Réunion' => 'Reunion', |
|
16 | + 'Saint Barthélemy' => 'Saint Barthelemy', |
|
17 | + 'San José, Costa Rica' => 'San Jose, Costa Rica', |
|
18 | + 'São Paulo, Brazil' => 'Sao Paulo, Brazil', |
|
19 | + 'Tuxtla Gutiérrez, Mexico' => 'Tuxtla Gutierrez, Mexico', |
|
20 | + 'Åland Islands' => 'Aland Islands', |
|
21 | 21 | ); |
@@ -320,7 +320,7 @@ |
||
320 | 320 | 'real_name' => $real_name, |
321 | 321 | 'email' => $email, |
322 | 322 | 'password' => password_hash($password, PASSWORD_DEFAULT), |
323 | - 'secret' => $secret, |
|
323 | + 'secret' => $secret, |
|
324 | 324 | ]); |
325 | 325 | |
326 | 326 | $user_id = DB::lastInsertId(); |
@@ -67,11 +67,11 @@ discard block |
||
67 | 67 | $language = Validator::parsedBody($request)->string('language'); |
68 | 68 | $real_name = Validator::parsedBody($request)->string('real_name'); |
69 | 69 | $password = Validator::parsedBody($request)->string('password'); |
70 | - $secret = Validator::parsedBody($request)->string('secret'); |
|
70 | + $secret = Validator::parsedBody($request)->string('secret'); |
|
71 | 71 | $time_zone = Validator::parsedBody($request)->string('timezone'); |
72 | 72 | $user_name = Validator::parsedBody($request)->string('user_name'); |
73 | 73 | $visible_online = Validator::parsedBody($request)->boolean('visible-online', false); |
74 | - $status_mfa = Validator::parsedBody($request)->boolean('status-mfa', '0'); |
|
74 | + $status_mfa = Validator::parsedBody($request)->boolean('status-mfa', '0'); |
|
75 | 75 | |
76 | 76 | // Change the password |
77 | 77 | if ($password !== '') { |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | $user->setPreference(UserInterface::PREF_LANGUAGE, $language); |
105 | 105 | $user->setPreference(UserInterface::PREF_TIME_ZONE, $time_zone); |
106 | 106 | $user->setPreference(UserInterface::PREF_IS_VISIBLE_ONLINE, (string) $visible_online); |
107 | - $user->setPreference(UserInterface::PREF_IS_STATUS_MFA, (string) $status_mfa); |
|
107 | + $user->setPreference(UserInterface::PREF_IS_STATUS_MFA, (string) $status_mfa); |
|
108 | 108 | |
109 | 109 | if ($tree instanceof Tree) { |
110 | 110 | $default_xref = Validator::parsedBody($request)->string('default-xref'); |
@@ -409,7 +409,7 @@ |
||
409 | 409 | $admin = $this->user_service->create($data['wtuser'], $data['wtname'], $data['wtemail'], $data['wtpass'], $data['wtsecret']); |
410 | 410 | $admin->setPreference(UserInterface::PREF_LANGUAGE, $data['lang']); |
411 | 411 | $admin->setPreference(UserInterface::PREF_IS_VISIBLE_ONLINE, '1'); |
412 | - $admin->setPreference(UserInterface::PREF_IS_STATUS_MFA, '0'); |
|
412 | + $admin->setPreference(UserInterface::PREF_IS_STATUS_MFA, '0'); |
|
413 | 413 | } else { |
414 | 414 | $admin->setPassword($_POST['wtpass']); |
415 | 415 | } |
@@ -59,7 +59,7 @@ |
||
59 | 59 | $real_name = Validator::parsedBody($request)->string('real_name'); |
60 | 60 | $email = Validator::parsedBody($request)->string('email'); |
61 | 61 | $password = Validator::parsedBody($request)->string('password'); |
62 | - $secret = ""; |
|
62 | + $secret = ""; |
|
63 | 63 | |
64 | 64 | $errors = false; |
65 | 65 |
@@ -96,7 +96,7 @@ |
||
96 | 96 | $password = Validator::parsedBody($request)->string('password'); |
97 | 97 | $realname = Validator::parsedBody($request)->string('realname'); |
98 | 98 | $username = Validator::parsedBody($request)->string('username'); |
99 | - $secret = Validator::parsedBody($request)->string('secret'); |
|
99 | + $secret = Validator::parsedBody($request)->string('secret'); |
|
100 | 100 | |
101 | 101 | try { |
102 | 102 | if ($this->captcha_service->isRobot($request)) { |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $default_url = route(HomePage::class); |
70 | 70 | $username = Validator::parsedBody($request)->string('username'); |
71 | 71 | $password = Validator::parsedBody($request)->string('password'); |
72 | - $code2fa = Validator::parsedBody($request)->string('code2fa'); |
|
72 | + $code2fa = Validator::parsedBody($request)->string('code2fa'); |
|
73 | 73 | $url = Validator::parsedBody($request)->isLocalUrl()->string('url', $default_url); |
74 | 74 | |
75 | 75 | try { |
@@ -132,15 +132,15 @@ discard block |
||
132 | 132 | throw new Exception(I18N::translate('This account has not been approved. Please wait for an administrator to approve it.')); |
133 | 133 | } |
134 | 134 | if ($user->getPreference(UserInterface::PREF_IS_STATUS_MFA) !== '') { |
135 | - # covers scenario where 2fa not enabled by user |
|
136 | - if($code2fa != '') { |
|
135 | + # covers scenario where 2fa not enabled by user |
|
136 | + if($code2fa != '') { |
|
137 | 137 | if (!$user->check2FAcode($code2fa)) { |
138 | 138 | throw new Exception(I18N::translate('2FA code does not match. Please try again.')); |
139 | 139 | } |
140 | - } |
|
141 | - else { |
|
140 | + } |
|
141 | + else { |
|
142 | 142 | throw new Exception(I18N::translate('2FA code must be entered as you have 2FA authentication enabled. Please try again.')); |
143 | - } |
|
143 | + } |
|
144 | 144 | } |
145 | 145 | Auth::login($user); |
146 | 146 | Log::addAuthenticationLog('Login: ' . Auth::user()->userName() . '/' . Auth::user()->realName()); |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $real_name = Validator::parsedBody($request)->string('real_name'); |
76 | 76 | $email = Validator::parsedBody($request)->string('email'); |
77 | 77 | $password = Validator::parsedBody($request)->string('password'); |
78 | - $secret = Validator::parsedBody($request)->string('secret'); |
|
78 | + $secret = Validator::parsedBody($request)->string('secret'); |
|
79 | 79 | $theme = Validator::parsedBody($request)->string('theme'); |
80 | 80 | $language = Validator::parsedBody($request)->string('language'); |
81 | 81 | $timezone = Validator::parsedBody($request)->string('timezone'); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $canadmin = Validator::parsedBody($request)->boolean('canadmin', false); |
86 | 86 | $visible_online = Validator::parsedBody($request)->boolean('visible-online', false); |
87 | 87 | $verified = Validator::parsedBody($request)->boolean('verified', false); |
88 | - $status_mfa = Validator::parsedBody($request)->boolean('status-mfa', false); |
|
88 | + $status_mfa = Validator::parsedBody($request)->boolean('status-mfa', false); |
|
89 | 89 | $approved = Validator::parsedBody($request)->boolean('approved', false); |
90 | 90 | |
91 | 91 | $edit_user = $this->user_service->find($user_id); |