From 90400bf5ad7b35077084a54ca50d0cda43ad7bd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Fri, 7 Aug 2015 10:14:36 +0200 Subject: [PATCH] fix(ldap): fix for ldap users with empty email address, fixes #2461 --- CHANGELOG.md | 1 + pkg/services/sqlstore/user.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e60094d9ace..db92105c031 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - [Issue #2442](https://github.com/grafana/grafana/issues/2442). Templating: Fix text panel when using template variables in text in in repeated panel - [Issue #2446](https://github.com/grafana/grafana/issues/2446). InfluxDB: Fix for using template vars inside alias field (InfluxDB 0.9) - [Issue #2460](https://github.com/grafana/grafana/issues/2460). SinglestatPanel: Fix to handle series with no data points +- [Issue #2461](https://github.com/grafana/grafana/issues/2461). LDAP: Fix for ldap users with empty email address # 2.1.0 (2015-08-04) diff --git a/pkg/services/sqlstore/user.go b/pkg/services/sqlstore/user.go index f5df6f9ff1f..08eec5e586c 100644 --- a/pkg/services/sqlstore/user.go +++ b/pkg/services/sqlstore/user.go @@ -72,6 +72,10 @@ func CreateUser(cmd *m.CreateUserCommand) error { return err } + if cmd.Email == "" { + cmd.Email = cmd.Login + } + // create user user := m.User{ Email: cmd.Email,