Skip to content
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

Users have wrong locale/language when creating multiple users consecutively #16522

Closed
konwin opened this issue Jul 23, 2019 · 4 comments · Fixed by #16727
Closed

Users have wrong locale/language when creating multiple users consecutively #16522

konwin opened this issue Jul 23, 2019 · 4 comments · Fixed by #16727

Comments

@konwin
Copy link

konwin commented Jul 23, 2019

I have an issue when adding users consecutively, without reloading the users page.
I'm using Nextcloud with the config.php options
'default_language' => 'de',
and
'default_locale' => 'de',
and when adding users (without a password) the first gets the german welcome email and his account will be in german. But when adding directly a second (or third/fourth/...) user he will get the english welcome email and his account settings will be set to english!
If I reload the users page before creating the next user he will get the german welcome email and his account will be set to german again!

@J0WI J0WI transferred this issue from nextcloud/docker Jul 23, 2019
@J0WI J0WI added 0. Needs triage Pending check for reproducibility or if it fits our roadmap needs info labels Jul 23, 2019
@J0WI
Copy link
Contributor

J0WI commented Jul 23, 2019

This is not related to Docker. Could you please post your NextCloud version, server variant etc.?
There was a similar issue (#11306) in older versions of NextCloud.

@kesselb kesselb added bug 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Aug 12, 2019
@kesselb
Copy link
Contributor

kesselb commented Aug 12, 2019

resetForm() {
// revert form to original state
Object.assign(this.newUser, this.$options.data.call(this).newUser);
// reset group
this.setNewUserDefaultGroup(this.selectedGroup);
this.loading.all = false;
},

The form is cleared after the user has been created. Default value for language is en.

/**
* Init default language from server data. The use of this.settings
* requires a computed variable, which break the v-model binding of the form,
* this is a much easier solution than getter and setter on a computed var
*/
Vue.set(this.newUser.language, 'code', this.settings.defaultLanguage);

I guess we need to move this code into a method and call it from resetForm too (because the mount stage is not executed again) or use the updated stage.

cc @skjnldsv @nextcloud/vue

@skjnldsv
Copy link
Member

Nice catch!

@skjnldsv skjnldsv added 3. to review Waiting for reviews and removed 1. to develop Accepted and waiting to be taken care of labels Aug 13, 2019
@skjnldsv
Copy link
Member

Fix #16727

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

Successfully merging a pull request may close this issue.

4 participants