This commit is contained in:
2022-10-18 10:29:26 +02:00
parent 5d2f6b6dd0
commit eeefd826e5
70 changed files with 3175 additions and 815 deletions
@@ -112,11 +112,12 @@ class UserCollection implements UserCollectionInterface
// If not found, try the fields
if (!$user->exists()) {
$query = mb_strtolower($query);
foreach ($files as $file) {
if (Utils::endsWith($file, YAML_EXT)) {
$find_user = $this->load(trim(Utils::pathinfo($file, PATHINFO_FILENAME)));
foreach ($fields as $field) {
if (isset($find_user[$field]) && $find_user[$field] === $query) {
if (isset($find_user[$field]) && mb_strtolower($find_user[$field]) === $query) {
return $find_user;
}
}