diff options
Diffstat (limited to 'settings/src/store/users.js')
-rw-r--r-- | settings/src/store/users.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/settings/src/store/users.js b/settings/src/store/users.js index 61bda9c0603..cf418f81ca3 100644 --- a/settings/src/store/users.js +++ b/settings/src/store/users.js @@ -342,14 +342,10 @@ const actions = { * @param {string} options.quota User email * @returns {Promise} */ - addUser({context, dispatch}, { userid, password, email, groups, subadmin, quota }) { - console.log(subadmin, quota); + addUser({context, dispatch}, { userid, password, email, groups, subadmin, quota, language }) { return api.requireAdmin().then((response) => { - return api.post(OC.linkToOCS(`cloud/users`, 2), { userid, password, email, groups, subadmin, quota }) - .then((response) => { - //let quotaDis = dispatch('setUserData', { userid, key: 'quota', value:quota }); - //let subadminDis = dispatch('addUserSubAdmin', userid); - }) + return api.post(OC.linkToOCS(`cloud/users`, 2), { userid, password, email, groups, subadmin, quota, language }) + .then((response) => dispatch('addUserData', userid)) .catch((error) => {throw error;}); }).catch((error) => context.commit('API_FAILURE', { userid, error })); }, |