Merge pull request #5152 from tobiasd/20180531-regform

the detected language was not stored during user creation
This commit is contained in:
Michael Vogel 2018-05-31 14:31:33 +02:00 committed by GitHub
commit 06e8d9db58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -331,6 +331,7 @@ class User
$confirm = x($data, 'confirm') ? trim($data['confirm']) : ''; $confirm = x($data, 'confirm') ? trim($data['confirm']) : '';
$blocked = x($data, 'blocked') ? intval($data['blocked']) : 0; $blocked = x($data, 'blocked') ? intval($data['blocked']) : 0;
$verified = x($data, 'verified') ? intval($data['verified']) : 0; $verified = x($data, 'verified') ? intval($data['verified']) : 0;
$language = x($data, 'language') ? notags(trim($data['language'])) : 'en';
$publish = x($data, 'profile_publish_reg') && intval($data['profile_publish_reg']) ? 1 : 0; $publish = x($data, 'profile_publish_reg') && intval($data['profile_publish_reg']) ? 1 : 0;
$netpublish = strlen(Config::get('system', 'directory')) ? $publish : 0; $netpublish = strlen(Config::get('system', 'directory')) ? $publish : 0;
@ -466,6 +467,7 @@ class User
'sprvkey' => $sprvkey, 'sprvkey' => $sprvkey,
'verified' => $verified, 'verified' => $verified,
'blocked' => $blocked, 'blocked' => $blocked,
'language' => $language,
'timezone' => 'UTC', 'timezone' => 'UTC',
'register_date' => DateTimeFormat::utcNow(), 'register_date' => DateTimeFormat::utcNow(),
'default-location' => '' 'default-location' => ''