optional name param for GH plugin

This commit is contained in:
Brad Rydzewski 2014-09-05 18:35:05 -07:00
parent 446fb04d49
commit 962a4487d7

View file

@ -92,8 +92,11 @@ func (r *GitHub) Authorize(res http.ResponseWriter, req *http.Request) (*model.L
login.ID = int64(*useremail.ID)
login.Access = token.AccessToken
login.Login = *useremail.Login
login.Name = *useremail.Name
login.Email = *useremail.Email
if username.Name == nil {
login.Name = *useremail.Email
}
return login, nil
}