mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
Fixes testcase errors.
Signed-off-by: Faraz Samapoor <fsa@adlas.at>
This commit is contained in:
parent
a1acacf032
commit
8cb078b58c
1 changed files with 9 additions and 8 deletions
|
|
@ -85,7 +85,7 @@ class AccountManager implements IAccountManager {
|
|||
|
||||
private string $table = 'accounts';
|
||||
private string $dataTable = 'accounts_data';
|
||||
private IL10N $l10n;
|
||||
private ?IL10N $l10n = null;
|
||||
private CappedMemoryCache $internalCache;
|
||||
|
||||
/**
|
||||
|
|
@ -120,7 +120,6 @@ class AccountManager implements IAccountManager {
|
|||
private ICrypto $crypto,
|
||||
) {
|
||||
$this->internalCache = new CappedMemoryCache();
|
||||
$this->l10n = $factory->get('core');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -348,12 +347,10 @@ class AccountManager implements IAccountManager {
|
|||
}
|
||||
|
||||
protected function searchUsersForRelatedCollection(string $property, array $values): array {
|
||||
switch ($property) {
|
||||
case IAccountManager::PROPERTY_EMAIL:
|
||||
return array_flip($this->searchUsers(IAccountManager::COLLECTION_EMAIL, $values));
|
||||
default:
|
||||
return [];
|
||||
}
|
||||
return match ($property) {
|
||||
IAccountManager::PROPERTY_EMAIL => array_flip($this->searchUsers(IAccountManager::COLLECTION_EMAIL, $values)),
|
||||
default => [],
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -416,6 +413,10 @@ class AccountManager implements IAccountManager {
|
|||
'link' => $link,
|
||||
]);
|
||||
|
||||
if (!$this->l10n) {
|
||||
$this->l10n = $this->factory->get('core');
|
||||
}
|
||||
|
||||
$emailTemplate->setSubject($this->l10n->t('%s email verification', [$this->defaults->getName()]));
|
||||
$emailTemplate->addHeader();
|
||||
$emailTemplate->addHeading($this->l10n->t('Email verification'));
|
||||
|
|
|
|||
Loading…
Reference in a new issue