mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-10 08:30:48 +01:00
feat: get setting
This commit is contained in:
parent
a1bc26c46c
commit
c6b9268f02
@ -110,11 +110,12 @@ function setting($name, $again = false)
|
||||
|
||||
$user = Auth::user();
|
||||
if ($user) {
|
||||
$user_options = json_decode($user->options, true) ?: [];
|
||||
$user_options = json_decode($user->options ?: '', true) ?: [];
|
||||
}
|
||||
|
||||
if ($user_options['settings'][$setting->id] !== null) {
|
||||
$value = $user_options['settings'][$setting->id];
|
||||
$value = is_array($value) ? implode(',', $value) : $value;
|
||||
} else {
|
||||
$value = $setting->valore;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user