From 2f0fe2263e73f9bc04d043757883fa0aed3c2669 Mon Sep 17 00:00:00 2001 From: James Moger Date: Mon, 8 Sep 2014 13:57:09 -0400 Subject: [PATCH] Allow LDAP to reset/delete an user email address value --- src/main/java/com/gitblit/auth/LdapAuthProvider.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/gitblit/auth/LdapAuthProvider.java b/src/main/java/com/gitblit/auth/LdapAuthProvider.java index a4d7bb05..5690073a 100644 --- a/src/main/java/com/gitblit/auth/LdapAuthProvider.java +++ b/src/main/java/com/gitblit/auth/LdapAuthProvider.java @@ -427,6 +427,10 @@ public class LdapAuthProvider extends UsernamePasswordAuthenticationProvider { Attribute attribute = userEntry.getAttribute(email); if (attribute != null && attribute.hasValue()) { user.emailAddress = attribute.getValue(); + } else { + // issue-456/ticket-134 + // allow LDAP to delete an email address + user.emailAddress = null; } } } -- 2.39.5