fixed crashing error in graph/user/picture, and started updating the main post row in topic.tpl

This commit is contained in:
psychobunny
2013-05-15 15:55:39 -04:00
parent 74649f64e2
commit 91b4ec2547
2 changed files with 57 additions and 26 deletions

View File

@@ -218,7 +218,12 @@ var express = require('express'),
app.get('/graph/users/:username/picture', function(req, res) {
user.get_uid_by_username(req.params.username, function(uid) {
if (uid == null) {
res.send('{status:0}');
return;
}
user.getUserField(uid, 'picture', function(picture) {
if (picture == null) res.redirect('http://www.gravatar.com/avatar/a938b82215dfc96c4cabeb6906e5f953');
res.redirect(picture);
});
});