Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
displayName undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
codydaig committed Jul 24, 2015
1 parent 29d264d commit 7605956
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/users/server/config/strategies/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = function(config) {
providerData.refreshToken = refreshToken;

// Create the user OAuth profile
var displayName = profile.displayName.trim();
var displayName = profile.displayName ? profile.displayName.trim() : profile.username.trim();
var iSpace = displayName.indexOf(' '); // index of the whitespace following the firstName
var firstName = iSpace !== -1 ? displayName.substring(0, iSpace) : displayName;
var lastName = iSpace !== -1 ? displayName.substring(iSpace + 1) : '';
Expand Down

0 comments on commit 7605956

Please sign in to comment.