Skip to content

Commit 10eb873

Browse files
committed
refactor(settings): inline allowedAppValues
1 parent 919e148 commit 10eb873

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

apps/settings/lib/Controller/UsersController.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,7 @@ public function usersList(INavigationManager $navigationManager, ISubAdmin $subA
267267
*/
268268
#[AuthorizedAdminSetting(settings:Users::class)]
269269
public function setPreference(string $key, string $value): JSONResponse {
270-
$allowedAppValues = [
271-
'newUser.sendEmail',
272-
'group.sortBy',
273-
];
274-
275-
if (in_array($key, $allowedAppValues, true)) {
270+
if (in_array($key, ['newUser.sendEmail', 'group.sortBy'], true)) {
276271
if ($key === 'newUser.sendEmail') {
277272
$this->appConfig->setValueBool('core', $key, $value === 'yes');
278273
} else {

0 commit comments

Comments
 (0)