diff --git a/plugin/remote/github/github.go b/plugin/remote/github/github.go index 4bb0ffe8f..32f2a2a74 100644 --- a/plugin/remote/github/github.go +++ b/plugin/remote/github/github.go @@ -93,8 +93,9 @@ func (r *GitHub) Authorize(res http.ResponseWriter, req *http.Request) (*model.L login.Access = token.AccessToken login.Login = *useremail.Login login.Email = *useremail.Email - if username.Name == nil { - login.Name = *useremail.Email + login.Name = *useremail.Email + if useremail.Name != nil { + login.Name = *useremail.Name } return login, nil