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 năm trước cách đây
mục cha
commit
6bb174b80a
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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