Skip to content

Commit

Permalink
profile.name is called profile.fullname (wekan#615)
Browse files Browse the repository at this point in the history
The name of the profile field was changed log ago. This fixes the
remaining wrong references.
  • Loading branch information
AlexanderS authored and mquandalle committed Jul 11, 2016
1 parent 36f17a5 commit 855f56c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions client/components/import/import.jade
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ template(name="importMapMembersAddPopup")
ul.pop-over-list
+esEach(index="users")
li.item.js-member-item
a.name.js-select-import(title="{{profile.name}} ({{username}})" data-id="{{_id}}")
a.name.js-select-import(title="{{profile.fullname}} ({{username}})" data-id="{{_id}}")
+userAvatar(userId=_id esSearch=true)
span.full-name
= profile.name
= profile.fullname
| (<span class="username">{{username}}</span>)
+ifEsIsSearching(index='users')
+spinner
Expand Down
2 changes: 1 addition & 1 deletion client/components/sidebar/sidebar.jade
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ template(name="addMemberPopup")
ul.pop-over-list
+esEach(index="users")
li.item.js-member-item(class="{{#if isBoardMember}}disabled{{/if}}")
a.name.js-select-member(title="{{profile.name}} ({{username}})")
a.name.js-select-member(title="{{profile.fullname}} ({{username}})")
+userAvatar(userId=_id esSearch=true)
span.full-name
= profile.fullname
Expand Down
4 changes: 2 additions & 2 deletions models/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ if (Meteor.isServer) {
Users.before.insert((userId, doc) => {
doc.profile = doc.profile || {};

if (!doc.username && doc.profile.name) {
doc.username = doc.profile.name.toLowerCase().replace(/\s/g, '');
if (!doc.username && doc.profile.fullname) {
doc.username = doc.profile.fullname.toLowerCase().replace(/\s/g, '');
}
});

Expand Down

0 comments on commit 855f56c

Please sign in to comment.