mirror of
https://github.com/grafana/grafana.git
synced 2025-01-08 15:13:30 -06:00
Set email when creating user from auth_proxy header, Fixes #2156
This commit is contained in:
parent
30db7e64fb
commit
66e60357dc
@ -60,8 +60,10 @@ func getCreateUserCommandForProxyAuth(headerVal string) *m.CreateUserCommand {
|
||||
cmd := m.CreateUserCommand{}
|
||||
if setting.AuthProxyHeaderProperty == "username" {
|
||||
cmd.Login = headerVal
|
||||
cmd.Email = headerVal
|
||||
} else if setting.AuthProxyHeaderProperty == "email" {
|
||||
cmd.Email = headerVal
|
||||
cmd.Login = headerVal
|
||||
} else {
|
||||
panic("Auth proxy header property invalid")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user