The BuddyPress Simple Attributes extension allows you to map Active Directory attributes to BuddyPress fields.

NADI Extension: BuddyPress Simple Attributes

Usage

Please note that you can not use this extension in combination with NADI's Ultimate Member extensions due to internal UM restrictions.
  • 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.

Configure BuddyPress profile fields

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.

NADI mappings

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.

NADI Extension: BuddyPress Simple Attributes

FAQ

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.

API

nadiext_buddypress_simpleattributes_filter_mappings

nadiext_buddypress_simpleattributes_filter_mappings (array $mappings) : array $mappings

Assign custom converters or mappings for BuddyPress integration.

Description

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.

Return value

array $mappings

The newly defined mappings.

Parameters

array $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.