mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-05 04:46:03 +01:00
Default to english if language is not set
This commit is contained in:
@@ -165,6 +165,12 @@ class Admin
|
|||||||
{
|
{
|
||||||
if (!$this->user->authenticated && isset($form['username']) && isset($form['password'])) {
|
if (!$this->user->authenticated && isset($form['username']) && isset($form['password'])) {
|
||||||
$user = User::load($form['username']);
|
$user = User::load($form['username']);
|
||||||
|
|
||||||
|
//default to english if language not set
|
||||||
|
if (empty($user->language)) {
|
||||||
|
$user->set('language', 'en');
|
||||||
|
}
|
||||||
|
|
||||||
if ($user->exists()) {
|
if ($user->exists()) {
|
||||||
$user->authenticated = true;
|
$user->authenticated = true;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user