fix: [theme] selection always defaults to default if no user setting set fixed

pull/79/head
iglocska 2021-10-21 11:06:12 +02:00
parent 411a37bfbf
commit d4d5b28341
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 2 additions and 3 deletions

View File

@ -132,9 +132,8 @@ class AppController extends Controller
$this->set('ajax', $this->request->is('ajax'));
$this->request->getParam('prefix');
$this->set('baseurl', Configure::read('App.fullBaseUrl'));
if (!empty($user) && !empty($user->user_settings_by_name_with_fallback['ui.bsTheme']['value'])) {
$this->set('bsTheme', $user->user_settings_by_name_with_fallback['ui.bsTheme']['value']);
if (!empty($user) && !empty($user->user_settings_by_name['ui.bsTheme']['value'])) {
$this->set('bsTheme', $user->user_settings_by_name['ui.bsTheme']['value']);
} else {
$this->set('bsTheme', Configure::read('ui.bsTheme'));
}