mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2025-01-22 20:54:52 +00:00
add missed locales whitelist validation #19
This commit is contained in:
parent
4852882243
commit
90f28cfd8b
@ -47,8 +47,17 @@ class UserController extends AbstractController
|
||||
// Update locales
|
||||
if ($request->get('locales'))
|
||||
{
|
||||
$locales = [];
|
||||
foreach ((array) $request->get('locales') as $locale)
|
||||
{
|
||||
if (in_array($locale, explode('|', $this->getParameter('app.locales'))))
|
||||
{
|
||||
$locales[] = $locale;
|
||||
}
|
||||
}
|
||||
|
||||
$user->setLocales(
|
||||
$request->get('locales')
|
||||
$locales
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user