mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-03-31 17:15:38 +00:00
implement theme settings #17
This commit is contained in:
parent
0ab282e1c4
commit
5a940541ee
8 changed files with 55 additions and 3 deletions
|
|
@ -134,6 +134,14 @@ class UserController extends AbstractController
|
|||
);
|
||||
}
|
||||
|
||||
// Update theme
|
||||
if (in_array($request->get('theme'), explode('|', $this->getParameter('app.themes'))))
|
||||
{
|
||||
$user->setTheme(
|
||||
$request->get('theme')
|
||||
);
|
||||
}
|
||||
|
||||
// Save changes to DB
|
||||
$userService->save($user);
|
||||
|
||||
|
|
@ -158,13 +166,15 @@ class UserController extends AbstractController
|
|||
'status' => $user->isStatus(),
|
||||
'locale' => $user->getLocale(),
|
||||
'locales' => $user->getLocales(),
|
||||
'theme' => $user->getTheme(),
|
||||
'added' => $user->getAdded(),
|
||||
'identicon' => $userService->identicon(
|
||||
$user->getAddress(),
|
||||
48
|
||||
),
|
||||
],
|
||||
'locales' => explode('|', $this->getParameter('app.locales'))
|
||||
'locales' => explode('|', $this->getParameter('app.locales')),
|
||||
'themes' => explode('|', $this->getParameter('app.themes'))
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue