Explorar o código

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 %!s(int64=8) %!d(string=hai) anos
pai
achega
6bb174b80a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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