Commit 2b76daab authored by THEO GUILLON's avatar THEO GUILLON
Browse files

Merge branch '547-identifiant-d-acces-en-majuscules-uniquement' into '2.1.0'

Resolve "identifiant d'accès en majuscules uniquement"

See merge request libriciel/pole-citoyens/web-DPO/web-DPO!639
parents 2cf5fdfd 94534212
Pipeline #16597 passed with stage
in 2 minutes and 5 seconds
......@@ -826,16 +826,12 @@ class UsersController extends AppController {
$autorisationLogin = false;
if (Configure::read('MODE_CASE_SENSITIVE') === true) {
$username = $this->request->data('User.username');
$queryCondition = [
'username' => $username
'username' => $this->request->data('User.username')
];
} else {
$username = strtolower($this->request->data('User.username'));
$queryCondition = [
'LOWER(username)' => $username
'LOWER(username)' => strtolower($this->request->data('User.username'))
];
}
......@@ -844,7 +840,8 @@ class UsersController extends AppController {
'fields' => [
'id',
'ldap',
'password'
'password',
'username'
]
]);
......@@ -930,7 +927,7 @@ class UsersController extends AppController {
}
} else {
if (Configure::read('MODE_CASE_SENSITIVE') === false) {
$this->request->data['User']['username'] = $username;
$this->request->data['User']['username'] = $idUser['User']['username'];
}
$autorisationLogin = $this->Auth->login();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment