Skip to content

Commit

Permalink
[5.1] Fix Fontend language field multilingual without compatibility p…
Browse files Browse the repository at this point in the history
…lugin (#43791)
  • Loading branch information
bembelimen authored Jul 26, 2024
1 parent 45b122c commit b1a759d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion administrator/components/com_users/src/Model/UserModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function getForm($data = [], $loadData = true)

// When multilanguage is set, a user's default site language should also be a Content Language
if (Multilanguage::isEnabled()) {
$form->setFieldAttribute('language', 'type', 'frontend_language', 'params');
$form->setFieldAttribute('language', 'type', 'frontendlanguage', 'params');
}

$userId = (int) $form->getValue('id');
Expand Down
2 changes: 1 addition & 1 deletion components/com_users/src/Model/ProfileModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function getForm($data = [], $loadData = true)

// When multilanguage is set, a user's default site language should also be a Content Language
if (Multilanguage::isEnabled()) {
$form->setFieldAttribute('language', 'type', 'frontend_language', 'params');
$form->setFieldAttribute('language', 'type', 'frontendlanguage', 'params');
}

// If the user needs to change their password, mark the password fields as required
Expand Down
2 changes: 1 addition & 1 deletion components/com_users/src/Model/RegistrationModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ public function getForm($data = [], $loadData = true)

// When multilanguage is set, a user's default site language should also be a Content Language
if (Multilanguage::isEnabled()) {
$form->setFieldAttribute('language', 'type', 'frontend_language', 'params');
$form->setFieldAttribute('language', 'type', 'frontendlanguage', 'params');
}

return $form;
Expand Down

0 comments on commit b1a759d

Please sign in to comment.