Also send display name with invite link

This commit is contained in:
Johannes Zellner
2020-02-05 16:34:34 +01:00
parent 1f41e6dc0f
commit aa7ec53257

View File

@@ -563,7 +563,12 @@ function getOwner(callback) {
}
function inviteLink(user) {
return `${settings.adminOrigin()}/setupaccount.html?resetToken=${user.resetToken}&email=${encodeURIComponent(user.email)}` + (user.username ? `&username=${encodeURIComponent(user.username)}` : '');
let link = `${settings.adminOrigin()}/setupaccount.html?resetToken=${user.resetToken}&email=${encodeURIComponent(user.email)}`;
if (user.username) link += `&username=${encodeURIComponent(user.username)}`;
if (user.displayName) link += `&displayName=${encodeURIComponent(user.displayName)}`;
return link;
}
function createInvite(userId, callback) {