LDAP Email and login

Alejandro Tamayo Castillo's Avatar

Alejandro Tamayo Castillo

15 Oct, 2013 03:05 PM

Users must have "email" defined in LDAP (Active Directory), because the EmailAddress column in user table cannot be NULL.

could not execute batch command.[SQL: SQL not available] ---> System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'EmailAddress', table 'HgLab.dbo.User'; column does not allow nulls. INSERT fails.

But this is not mandatory and there are some directories (LDAP) where users doesnt have email specified, therefore they cannot use HgLab.

A simple solution would be, if the user doesnt have email specified then add the UPN as email in the User table automatically (the userPrincipalName is user@domain). Also, the Email field should be editable in the user profile through UI, because maybe the user would like to use an external email like @gmail.com or @yahoo.com or change its current email whenever is specified in LDAP or not.

  1. Support Staff 1 Posted by Anton Gogolev on 16 Oct, 2013 07:40 AM

    Anton Gogolev's Avatar


    Users not having an email address is something I have already stumbled upon and that's already fixed in an upcoming version (this and auto-generation of email addresses).

    As for changing ones' email address, it's a nice idea but requires careful handling of various edge-cases. Plus, I'm thinking of supporting multiple emails per user (so that changesets will get linked properly), so this has to be factored in.

    Nevertheless, thanks for the report!

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

19 Mar, 2021 06:13 PM
01 Mar, 2021 02:51 PM
01 Jan, 2021 02:19 AM
28 Aug, 2020 08:34 AM
23 Jun, 2020 08:29 AM


19 Dec, 2019 06:58 AM
21 Aug, 2019 09:07 AM
30 Jul, 2019 08:59 PM
31 May, 2019 02:29 PM
26 Nov, 2018 01:47 PM
16 Nov, 2018 07:51 PM