Merge pull request #1123 from letusfly85/0.4-database-gitlab-avatar

add avatar url for gitlab
This commit is contained in:
Brad Rydzewski 2015-08-10 00:36:20 -07:00
commit 1a92825799

View file

@ -76,6 +76,12 @@ func (r *Gitlab) Login(token, secret string) (*common.User, error) {
user.Email = login.Email
user.Token = token
user.Secret = secret
if strings.HasPrefix(login.AvatarUrl, "http") {
user.Avatar = login.AvatarUrl
} else {
user.Avatar = r.URL + "/" + login.AvatarUrl
}
return &user, nil
}