From 7bb38f8c7be7f0152f65205eb28c32001ac1872d Mon Sep 17 00:00:00 2001 From: Felix Rieseberg Date: Mon, 13 Oct 2014 08:22:27 -0400 Subject: [PATCH] Accept Invitation: Generate Slug from Name No issue, but ref #4211 --- core/server/api/authentication.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/server/api/authentication.js b/core/server/api/authentication.js index 5822f4d05f..d37a004d63 100644 --- a/core/server/api/authentication.js +++ b/core/server/api/authentication.js @@ -139,7 +139,8 @@ authentication = { var dbHash = response.settings[0].value; return dataProvider.User.resetPassword(resetToken, newPassword, ne2Password, dbHash); }).then(function (user) { - return dataProvider.User.edit({name: name, email: email}, {id: user.id}); + // Setting the slug to '' has the model regenerate the slug from the user's name + return dataProvider.User.edit({name: name, email: email, slug: ''}, {id: user.id}); }).then(function () { return Promise.resolve({invitation: [{message: 'Invitation accepted.'}]}); }).catch(function (error) {