summaryrefslogtreecommitdiffstats
path: root/src/libtdeldap.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2025-09-30 16:53:44 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2025-10-17 19:02:59 -0500
commitf18baf461d242485c36f50c94561bbd07b909ac0 (patch)
treef3b8149e0955f70def1135f75b267b7430dee287 /src/libtdeldap.cpp
parentdc1647fdc32919ebaf47819d7aaa88d81b71736c (diff)
downloadlibtdeldap-f18baf461d242485c36f50c94561bbd07b909ac0.tar.gz
libtdeldap-f18baf461d242485c36f50c94561bbd07b909ac0.zip
Add jpegPhoto LDAP attribute to LDAPUserInfo object
Diffstat (limited to 'src/libtdeldap.cpp')
-rw-r--r--src/libtdeldap.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libtdeldap.cpp b/src/libtdeldap.cpp
index b9b8498..197f7c0 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);