Fixed Guest registration and default language.

Jumuro

Well-known member
Affected version
2.0.7
1. The guest enters the forum and sees it in the default language.
2. The guest chooses another language for himself.
3. The guest decides to register and this process takes place in the language chosen by him earlier.
4. Guest is successfully registered and the forum was displayed for him again in the default language.
 
Proposed solution:
File src/XF/Entity/User.php
line 1357
Change
$this->language_id = $options->defaultLanguageId;
to
$this->language_id = \XF::language()->getId();
 
Back
Top Bottom