New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin-created users should get site language instead of admin's language #9454

Closed
juho-jaakkola opened this Issue Mar 8, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@juho-jaakkola
Member

juho-jaakkola commented Mar 8, 2016

While adding new user accounts to the community manually, I realized that the accounts get the language I'm using. This means that the email where they receive their username and password is in Finnish. Also when they log in, the UI is in Finnish.

This is caused by the register_user() function checking the current language which in this case defaults to that or the admin.

We cannot replace that with elgg_get_config('language') because some sites may allow user to pick language on registration form (e.g. via the hl param).

One option would be to add this in action/useradd:

$new_user->language = elgg_get_config('language');

But perhaps we should also check whether there was a language passed among the user data. Checking hl param might not be best option because that may again have been changed by the admin. So perhaps just a param named language, and otherwise fallback to the site language? Am I missing anything?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment