diff options
| author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2025-09-30 16:53:44 -0500 |
|---|---|---|
| committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2025-10-22 19:18:20 -0500 |
| commit | cf5d78530a1f065b055e9cd1e62d20c3b9a288bc (patch) | |
| tree | 64865b8d99e63a45a2521cd22e856e03ffd39364 /src/libtdeldap.cpp | |
| parent | 5d3044948075b1b7a82e5b180b83c9a941160b6d (diff) | |
| download | libtdeldap-cf5d78530a1f065b055e9cd1e62d20c3b9a288bc.tar.gz libtdeldap-cf5d78530a1f065b055e9cd1e62d20c3b9a288bc.zip | |
Add jpegPhoto LDAP attribute to LDAPUserInfo object
Diffstat (limited to 'src/libtdeldap.cpp')
| -rw-r--r-- | src/libtdeldap.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libtdeldap.cpp b/src/libtdeldap.cpp index 676c217..ddfd4ba 100644 --- a/src/libtdeldap.cpp +++ b/src/libtdeldap.cpp @@ -707,6 +707,9 @@ LDAPUserInfo LDAPManager::parseLDAPUserRecord(LDAPMessage* entry) { else if (ldap_field == "businessCategory") { userinfo.businessCategory = vals[i]->bv_val; } + else if (ldap_field == "jpegPhoto") { + userinfo.profileAvatar.duplicate(vals[i]->bv_val, vals[i]->bv_len); + } else if (ldap_field == "carLicense") { userinfo.carLicense = vals[i]->bv_val; } @@ -1138,7 +1141,7 @@ int LDAPManager::updateUserInfo(LDAPUserInfo user, TQString *errstr) { // Assemble the LDAPMod structure // We will replace any existing attributes with the new values - int number_of_parameters = 49; // 49 primary attributes + int number_of_parameters = 50; // 50 primary attributes LDAPMod *mods[number_of_parameters+1]; set_up_attribute_operations(mods, number_of_parameters); @@ -1198,6 +1201,7 @@ int LDAPManager::updateUserInfo(LDAPUserInfo user, TQString *errstr) { add_single_attribute_operation(mods, &i, "preferredLanguage", user.preferredLanguage); add_single_attribute_operation(mods, &i, "locallyUniqueID", user.uniqueIdentifier); add_single_attribute_operation(mods, &i, "businessCategory", user.businessCategory); + add_single_binary_attribute_operation(mods, &i, "jpegPhoto", user.profileAvatar); add_single_attribute_operation(mods, &i, "carLicense", user.carLicense); add_single_attribute_operation(mods, &i, "notes", user.notes); add_single_binary_attribute_operation(mods, &i, "krb5ExtendedAttributes", acl_asn1_data); |
