mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
social: gitlab_oauth: set user ID in case email changes
Set `BasicUserInfo.Id` in the value returned by `SocialGitlab.UserInfo()`, in case the email address of the user changes in GitLab. That way, the user association won't be lost in Grafana.
This commit is contained in:
parent
47cb0c47fd
commit
ce804e9981
@ -118,6 +118,7 @@ func (s *SocialGitlab) UserInfo(client *http.Client, token *oauth2.Token) (*Basi
|
||||
}
|
||||
|
||||
userInfo := &BasicUserInfo{
|
||||
Id: fmt.Sprintf("%d", data.Id),
|
||||
Name: data.Name,
|
||||
Login: data.Username,
|
||||
Email: data.Email,
|
||||
|
Loading…
Reference in New Issue
Block a user