Browse Source

HPCC-17384 Admins can't add users

Admins are unable to add users unless they specify an employee number. The code
erroneously thinks there is an employee number because the call to getEmployee
returns a pointer to NULL instead of just NULL. This PR fixes that by testing
for NULL  and *NULL

Signed-off-by: Russ Whitehead <william.whitehead@lexisnexis.com>
Russ Whitehead 8 years ago
parent
commit
6bb174b80a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      system/security/LdapSecurity/ldapconnection.cpp

+ 1 - 1
system/security/LdapSecurity/ldapconnection.cpp

@@ -5909,7 +5909,7 @@ private:
         {
             attrs[ind++] = &username_attr;
             attrs[ind++] = &dispname_attr;
-            if (user.getEmployeeID())
+            if (employeeID && *employeeID)
                 attrs[ind++] = &employeeID_attr;
         }
         else