The BuddyPress Simple Attributes extension allows you to map AD attributes into 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.
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.