fix empty array result on user search
Signed-off-by: dartcafe <github@dartcafe.de>
This commit is contained in:
Родитель
5e82ad3c65
Коммит
7692c6f988
|
@ -121,10 +121,13 @@ class SystemService {
|
||||||
$list = [];
|
$list = [];
|
||||||
if ($query !== '') {
|
if ($query !== '') {
|
||||||
preg_match_all(self::REGEX_PARSE_MAIL, $query, $parsedQuery);
|
preg_match_all(self::REGEX_PARSE_MAIL, $query, $parsedQuery);
|
||||||
$emailAddress = $parsedQuery[2][0];
|
|
||||||
$displayName = $parsedQuery[1][0];
|
if (!empty($parsedQuery[1]) && !empty($parsedQuery[2])) {
|
||||||
if ($emailAddress && self::isValidEmail($emailAddress)) {
|
$emailAddress = $parsedQuery[2][0];
|
||||||
$list[] = new Email($emailAddress, $displayName, $emailAddress);
|
$displayName = $parsedQuery[1][0];
|
||||||
|
if ($emailAddress && self::isValidEmail($emailAddress)) {
|
||||||
|
$list[] = new Email($emailAddress, $displayName, $emailAddress);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$list = array_merge($list, UserBase::search($query));
|
$list = array_merge($list, UserBase::search($query));
|
||||||
|
|
Загрузка…
Ссылка в новой задаче