diff options
Diffstat (limited to 'settings/src/store')
-rw-r--r-- | settings/src/store/users.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/settings/src/store/users.js b/settings/src/store/users.js index 8fc1e66b794..8fc875b8a87 100644 --- a/settings/src/store/users.js +++ b/settings/src/store/users.js @@ -397,12 +397,13 @@ const actions = { * @returns {Promise} */ setUserData(context, { userid, key, value }) { - if (['email', 'quota', 'displayname', 'password'].indexOf(key) !== -1) { + let allowedEmpty = ['email', 'displayname']; + if (['email', 'language', 'quota', 'displayname', 'password'].indexOf(key) !== -1) { // We allow empty email or displayname if (typeof value === 'string' && ( - (['quota', 'password'].indexOf(key) !== -1 && value.length > 0) || - ['email', 'displayname'].indexOf(key) !== -1 + (allowedEmpty.indexOf(key) === -1 && value.length > 0) || + allowedEmpty.indexOf(key) !== -1 ) ) { return api.requireAdmin().then((response) => { |