Improve Sandstorm usernames management

We now use the `preferredHandle` exposed by Sandstorm as source for
the username and append a number if the username is already taken
since we need to ensure username uniqueness (eg 'max', 'max1', 'max2')

Fixes #352
This commit is contained in:
Maxime Quandalle 2015-11-11 14:15:37 -08:00
parent fc82f7227a
commit cb3bd86396
3 changed files with 30 additions and 7 deletions

View file

@ -89,7 +89,7 @@ template(name="addMemberPopup")
a.name.js-select-member(title="{{profile.name}} ({{username}})")
+userAvatar(userId=_id esSearch=true)
span.full-name
= profile.name
= profile.fullname
| (<span class="username">{{username}}</span>)
if isBoardMember
.quiet ({{_ 'joined'}})