Skip to content

Commit

Permalink
Fix a bug in client name generation
Browse files Browse the repository at this point in the history
  • Loading branch information
brianhelba committed Feb 28, 2017
1 parent f821d4f commit 22d70ef
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions web_external/models/UserModel.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
isic.models.UserModel = girder.models.UserModel.extend({
name: function () {
var name = this.get('name');
var realName;
if (this.has('login')) {
var privateName =
realName =
this.get('firstName') +
' ' + this.get('lastName') +
' (' + this.get('login') + ')';
name += ' [' + privateName + ']';
}
return name;

var displayName;
if (this.has('name')) {
displayName = this.get('name');
if (realName) {
displayName += ' [' + realName + ']';
}
} else {
// The user should always have either a 'login' or a 'name'
displayName = realName;
}
return displayName;
},

canAcceptTerms: function () {
Expand Down

0 comments on commit 22d70ef

Please sign in to comment.