mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Fixed login and user search by email not being case-insensitive when using Flex Users
This commit is contained in:
parent
9d6a2dba09
commit
b18b49a239
|
|
@ -9,6 +9,7 @@
|
|||
* Fixed a potential fatal error when using watermark in images
|
||||
* Fixed `bin/grav install` command with arbitrary destination folder name
|
||||
* Fixed Twig `|filter()` allowing code execution
|
||||
* Fixed login and user search by email not being case-insensitive when using Flex Users
|
||||
|
||||
# v1.7.33
|
||||
## 04/25/2022
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ class UserIndex extends FlexIndex implements UserCollectionInterface
|
|||
} elseif ($field === 'flex_key') {
|
||||
$user = $this->withKeyField('flex_key')->get($query);
|
||||
} elseif ($field === 'email') {
|
||||
$user = $this->withKeyField('email')->get($query);
|
||||
$user = $this->withKeyField('email')->get(static::filterUsername($query, $this->getFlexDirectory()->getStorage()));
|
||||
} elseif ($field === 'username') {
|
||||
$user = $this->get(static::filterUsername($query, $this->getFlexDirectory()->getStorage()));
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -97,7 +97,9 @@ class FlexServiceProvider implements ServiceProviderInterface
|
|||
'options' => [
|
||||
'file' => 'user',
|
||||
'pattern' => '{FOLDER}/{KEY:2}/{KEY}/{FILE}{EXT}',
|
||||
'key' => 'storage_key'
|
||||
'key' => 'storage_key',
|
||||
'indexed' => true,
|
||||
'case_sensitive' => false
|
||||
],
|
||||
];
|
||||
}
|
||||
|
|
@ -107,7 +109,9 @@ class FlexServiceProvider implements ServiceProviderInterface
|
|||
'class' => UserFileStorage::class,
|
||||
'options' => [
|
||||
'pattern' => '{FOLDER}/{KEY}{EXT}',
|
||||
'key' => 'username'
|
||||
'key' => 'username',
|
||||
'indexed' => true,
|
||||
'case_sensitive' => false
|
||||
],
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user