mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 14:50:17 -04:00
Fix type errors
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
3a1b3745eb
commit
008b79d808
2 changed files with 6 additions and 5 deletions
|
|
@ -178,7 +178,7 @@ class UserPlugin implements ISearchPlugin {
|
|||
$this->shareeEnumerationFullMatch &&
|
||||
$lowerSearch !== '' && (strtolower($uid) === $lowerSearch ||
|
||||
strtolower($userDisplayName) === $lowerSearch ||
|
||||
strtolower($userEmail) === $lowerSearch)
|
||||
strtolower($userEmail ?? '') === $lowerSearch)
|
||||
) {
|
||||
if (strtolower($uid) === $lowerSearch) {
|
||||
$foundUserById = true;
|
||||
|
|
|
|||
|
|
@ -386,13 +386,14 @@ class Database extends ABackend implements
|
|||
$row = $result->fetch();
|
||||
$result->closeCursor();
|
||||
|
||||
$this->cache[$uid] = false;
|
||||
|
||||
// "uid" is primary key, so there can only be a single result
|
||||
if ($row !== false) {
|
||||
$this->cache[$uid]['uid'] = (string)$row['uid'];
|
||||
$this->cache[$uid]['displayname'] = (string)$row['displayname'];
|
||||
$this->cache[$uid] = [
|
||||
'uid' => (string)$row['uid'],
|
||||
'displayname' => (string)$row['displayname'],
|
||||
];
|
||||
} else {
|
||||
$this->cache[$uid] = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue