Permalink
Browse files

Making sure we always get the real name and correct gravatar size.

  • Loading branch information...
1 parent 8039f25 commit b6d36a6d59e9bfdab9fbf79b6231fd8fb0c66d4f @simonwex simonwex committed Aug 14, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/models/user.js
View
4 app/models/user.js
@@ -19,7 +19,7 @@ require('../../lib/extensions/string');
function User(attrs){
this.email = (attrs['email'] || '').trim();
- this.realName = (attrs['realName'] || '').trim();
+ this.realName = (attrs['realName'] || attrs['real_name'] || '').trim();
this.nick = (attrs['nick'] || '').trim();
this.gravatarHash = crypto.createHash('md5').update(this.email).digest("hex");
}
@@ -43,7 +43,7 @@ User.prototype.getGravatarUrl = function(size){
size = 30;
}
var hash = crypto.createHash('md5').update(this.email).digest("hex");
- return "http://www.gravatar.com/avatar/" + hash + "s=" + size;
+ return "http://www.gravatar.com/avatar/" + hash + "?s=" + size;
};
User.prototype.save = function(callback){

0 comments on commit b6d36a6

Please sign in to comment.