We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 132d465 + 5002075 commit a99cac0Copy full SHA for a99cac0
lib/models/user.js
@@ -104,8 +104,12 @@ module.exports = function (sequelize, DataTypes) {
104
break
105
case 'gitlab':
106
photo = profile.avatarUrl
107
- if (bigger) photo = photo.replace(/(\?s=)\d*$/i, '$1400')
108
- else photo = photo.replace(/(\?s=)\d*$/i, '$196')
+ if (photo) {
+ if (bigger) photo = photo.replace(/(\?s=)\d*$/i, '$1400')
109
+ else photo = photo.replace(/(\?s=)\d*$/i, '$196')
110
+ } else {
111
+ photo = letterAvatars(profile.username)
112
+ }
113
114
case 'dropbox':
115
// no image api provided, use gravatar
0 commit comments