File tree Expand file tree Collapse file tree 2 files changed +16
-16
lines changed
fr/tutorials-and-examples/cms
ja/tutorials-and-examples/cms Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -148,14 +148,6 @@ Puis ajoutez le code suivant::
148
148
'queryParam' => 'redirect',
149
149
]);
150
150
151
- // Charge les identifiants et s'assure que nous vérifions les champs e-mail et mot de passe
152
- $authenticationService->loadIdentifier('Authentication.Password', [
153
- 'fields' => [
154
- 'username' => 'email',
155
- 'password' => 'password',
156
- ]
157
- ]);
158
-
159
151
// Charge les authenticators, nous voulons celui de session en premier
160
152
$authenticationService->loadAuthenticator('Authentication.Session');
161
153
// Configure la vérification des données du formulaire pour choisir l'email et le mot de passe
@@ -165,6 +157,14 @@ Puis ajoutez le code suivant::
165
157
'password' => 'password',
166
158
],
167
159
'loginUrl' => Router::url('/users/login'),
160
+ 'identifier' => [
161
+ 'Authentication.Password' => [
162
+ 'fields' => [
163
+ 'username' => 'email',
164
+ 'password' => 'password',
165
+ ],
166
+ ],
167
+ ],
168
168
]);
169
169
170
170
return $authenticationService;
Original file line number Diff line number Diff line change @@ -135,14 +135,6 @@ bcrypt は `PHPの推奨パスワードハッシュアルゴリズム <https://w
135
135
'queryParam' => 'redirect',
136
136
]);
137
137
138
- // identifiers を読み込み、email と password のフィールドを確認します
139
- $authenticationService->loadIdentifier('Authentication.Password', [
140
- 'fields' => [
141
- 'username' => 'email',
142
- 'password' => 'password',
143
- ]
144
- ]);
145
-
146
138
// authenticatorsをロードしたら, 最初にセッションが必要です
147
139
$authenticationService->loadAuthenticator('Authentication.Session');
148
140
// 入力した email と password をチェックする為のフォームデータを設定します
@@ -152,6 +144,14 @@ bcrypt は `PHPの推奨パスワードハッシュアルゴリズム <https://w
152
144
'password' => 'password',
153
145
],
154
146
'loginUrl' => Router::url('/users/login'),
147
+ 'identifier' => [
148
+ 'Authentication.Password' => [
149
+ 'fields' => [
150
+ 'username' => 'email',
151
+ 'password' => 'password',
152
+ ],
153
+ ],
154
+ ],
155
155
]);
156
156
157
157
return $authenticationService;
You can’t perform that action at this time.
0 commit comments