Set email when creating user from auth_proxy header, Fixes #2156

This commit is contained in:
Torkel Ödegaard 2015-06-13 20:14:44 +02:00
parent 30db7e64fb
commit 66e60357dc

View File

@ -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")
}