Check for user defined channel matches before storing them

This commit is contained in:
Michael 2023-11-15 16:19:05 +00:00
parent e2891a660a
commit 43f9be367f
13 changed files with 236 additions and 42 deletions

View file

@ -582,6 +582,12 @@ class User
*/
public static function getLanguages(): array
{
$cachekey = 'user:getLanguages';
$languages = DI::cache()->get($cachekey);
if (!is_null($languages)) {
return $languages;
}
$supported = array_keys(DI::l10n()->getLanguageCodes());
$languages = [];
$uids = [];
@ -620,7 +626,10 @@ class User
DBA::close($channels);
ksort($languages);
return array_keys($languages);
$languages = array_keys($languages);
DI::cache()->set($cachekey, $languages);
return $languages;
}
/**