Premium extensions BuddyPress Simple AttributesFebruary 19, 2023 at 5:39 AM
The BuddyPress Simple Attributes extension allows you to map Active Directory attributes to BuddyPress fields.
- Download the premium extension
- Copy the extracted ZIP file into your wp-content/plugins directory
- Activate the plug-in in your WordPress plug-in view
Define BuddyPress user profile fields
In the WordPress dashboard go to Users > Profile Fields. Define the BuddyPress profile attribute you want to show in the user’s profile.
Define NADI fields
Make sure you have configured NADI. Go to Active Directory Integration > Attributes and define all AD attributes which you want to synchronize.
Map NADI fields to BuddyPress user profile fields
In the WordPress dashboard go to Active Directory Integration > BuddyPress: Simple attributes Define the mappings. The BuddyPress fields and AD attributes must have been defined by the previous steps.
With BuddyPress Simple Attributes enabled, BuddyPress’ profile synchronization no longer works
since 1.0.6 (NADIPE-40) BuddyPress Simple Attributes automatically disables this feature as the first and last name of a user a generated by splitting up the display name. With various configuration the display could be empty, resulting in a wrong first/last name mapping.
nadiext_buddypress_simpleattributes_filter_mappings (array $mappings) : array $mappings
Assign custom converters or mappings for BuddyPress integration.
The filter is executed after all AD attributes have been loaded by Next ADI and the Simple attributes extension is executed. Simple attributes loads the mappings defined by the administrator from the WordPress database and passes the mappings (key = BuddyPress field name or ID => value = AD attribute) to the filter.
The newly defined mappings.
All mappings configured by the WordPress administrator. Key is the name or id of the BuddyPress attribute, value is either
the AD attribute
an array in format of
[callable($adAttribute1, …, $adAttributeN, $rawLdapData), $adAttribute1, …, $adAttributeN, $adAttribute]
The second notation can be used to define complex converters.