diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-04-19 00:20:14 +0200 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-07-31 13:40:47 +0200 |
commit | ab6688fe0b4b380dc25916679f8f77f12380c12f (patch) | |
tree | f787cd6f1ce670489e57a83bd4b2e4324dc6d894 /settings/src | |
parent | 36326e38a08a4269416b6defe460e2a65609ad9a (diff) | |
download | nextcloud-server-ab6688fe0b4b380dc25916679f8f77f12380c12f.tar.gz nextcloud-server-ab6688fe0b4b380dc25916679f8f77f12380c12f.zip |
Set display name (if specified) when a new user is created
Although the form to create a new user included a field to set the
display name its value was not taken into account, so the new user ended
with the default display name (the same as the user name).
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'settings/src')
-rw-r--r-- | settings/src/components/userList.vue | 1 | ||||
-rw-r--r-- | settings/src/store/users.js | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/settings/src/components/userList.vue b/settings/src/components/userList.vue index 37c79671540..0649575bf88 100644 --- a/settings/src/components/userList.vue +++ b/settings/src/components/userList.vue @@ -324,6 +324,7 @@ export default { this.$store.dispatch('addUser', { userid: this.newUser.id, password: this.newUser.password, + displayName: this.newUser.displayName, email: this.newUser.mailAddress, groups: this.newUser.groups.map(group => group.id), subadmin: this.newUser.subAdminsGroups.map(group => group.id), diff --git a/settings/src/store/users.js b/settings/src/store/users.js index 156b967029f..f6e7f9ff650 100644 --- a/settings/src/store/users.js +++ b/settings/src/store/users.js @@ -415,16 +415,17 @@ const actions = { * @param {Object} context * @param {Object} options * @param {string} options.userid User id - * @param {string} options.password User password + * @param {string} options.password User password + * @param {string} options.displayName User display name * @param {string} options.email User email * @param {string} options.groups User groups * @param {string} options.subadmin User subadmin groups * @param {string} options.quota User email * @returns {Promise} */ - addUser({commit, dispatch}, { userid, password, email, groups, subadmin, quota, language }) { + addUser({commit, dispatch}, { userid, password, displayName, email, groups, subadmin, quota, language }) { return api.requireAdmin().then((response) => { - return api.post(OC.linkToOCS(`cloud/users`, 2), { userid, password, email, groups, subadmin, quota, language }) + return api.post(OC.linkToOCS(`cloud/users`, 2), { userid, password, displayName, email, groups, subadmin, quota, language }) .then((response) => dispatch('addUserData', userid)) .catch((error) => {throw error;}); }).catch((error) => commit('API_FAILURE', { userid, error })); |