add add top-menu-apps option in the personal settings
This commit is contained in:
@@ -63,8 +63,28 @@ class PersonalSettingController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
if ($name === 'top-menu-apps') {
|
||||
$doSave = true;
|
||||
$data = json_decode($value, true);
|
||||
|
||||
if (!is_array($data)) {
|
||||
$doSave = false;
|
||||
} else {
|
||||
foreach ($data as $v) {
|
||||
if (!is_string($v)) {
|
||||
$doSave = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($doSave) {
|
||||
$this->config->setUserValue($user->getUid(), 'side_menu', $name, $value);
|
||||
|
||||
return [
|
||||
'name' => $name,
|
||||
'value' => $value,
|
||||
];
|
||||
}
|
||||
|
||||
return [];
|
||||
|
||||
Reference in New Issue
Block a user