diff --git a/controllers/auth.js b/controllers/auth.js index 70c9b42..89e1515 100644 --- a/controllers/auth.js +++ b/controllers/auth.js @@ -131,7 +131,8 @@ function extractUserData (user) { favorites: [], dependents: [], home: userHome, - underage: user.underage + underage: user.underage, + displayName: user.getDisplayName() }; } diff --git a/models/learner.js b/models/learner.js index 90547e6..4aeef8a 100644 --- a/models/learner.js +++ b/models/learner.js @@ -108,7 +108,7 @@ module.exports = { return this.firstName + ' ' + this.lastName; }, getDisplayName: function () { - return this.firstName || this.username; + return this.username; }, getActivities: function (options, callback) { var learner = this; diff --git a/views/user/backpack.html b/views/user/backpack.html index de355ac..f07a671 100644 --- a/views/user/backpack.html +++ b/views/user/backpack.html @@ -32,7 +32,7 @@ {% endblock %} {% block no_data %} -

Welcome! It doesn't look like you've earned any Chicago Summer of Learning badges yet. Have no fear! You can check out cool projects in science, technology, engineering, art and math now on the Earn page.

+

Welcome {{ user.displayName }}! It doesn't look like you've earned any Chicago Summer of Learning badges yet. Have no fear! You can check out cool projects in science, technology, engineering, art and math now on the Earn page.

{% endblock %} {% block finally %} diff --git a/views/user/myplaylist.html b/views/user/myplaylist.html index 4212eec..5006cfd 100644 --- a/views/user/myplaylist.html +++ b/views/user/myplaylist.html @@ -1,5 +1,5 @@ {% extends 'layout.html' %} -{% set pageTitle = user.username + '’s Playlist' %} +{% set pageTitle = user.displayName + '’s Playlist' %} {% set bodyClass = 'myplaylist' %} {% set navItem = 'backpack' %} {% set subNavItem = 'playlist' %}