Last modified by eMDPlugins - 1 month ago
6 Views
2 min read

Mapping Microsoft Active Directory/LDAP server fields to your WordPress plugin

To sync a Microsoft Active Directory/LDAP field value to your WordPress plugin field, you must create a mapping. Before you map fields, it is important to follow the best practices below.

Mapping for unique and required values

  • Blue color indicates a required field. Any Microsoft Active Directory/LDAP field value corresponding to this field cannot be empty or null. You must have a mapping created for all required fields.
  • Red color indicates a unique field. Any Microsoft Active Directory/LDAP field value corresponding to this field cannot have duplicate values. For example, every employee must have a unique employee number or username. There cannot be another employee with the same employee number or username. You must have a mapping created for all unique values.

Creating WP Author field mapping

  • WP Author is mapped to WordPress admin user by default.
  • WP Author can be mapped to a field corresponding to a WordPress username or user email.
  • If Microsoft Active Directory/LDAP username value is empty, null or does not exist in WordPress, the default WP Author value on the import tab is used. In the IMPORT tab, you can set the default value to whichever WordPress user you prefer.

Setting custom field mapping

  • To map a custom LDAP field which is not listed in the dropdown, enter the field name in the textbox after clicking on the dropdown and then selecting it.
  • To sync a custom field which does not exist in WordPress or listed in the WordPress field dropdown, pick "Custom Field Placeholder".

Setting default values

  • To set a default value for a field, select the "Set Value" option from the LDAP field column and fill in the corresponding "Default Value" field.
  • To set a value for an incoming empty or null LDAP field value, fill in the corresponding "Default Value" field.
  • To set a default value for an image or file field, fill in the default value field with the URL of the image or file.
  • To set a default date value, the date format must be in YYYY-MM-DD such as 2019-12-20.
  • To set a default value for a relationship field, you must find the POST ID of the entity record corresponding to that relationship. For example, if you'd like to set all employees who do not have a manager set in your Microsoft Active Directory/LDAP server to a manager, fill in the "Default Value" field to the POST ID of the manager employee record.
  • To set a default value for a taxonomy field, you must fill in the SLUG of that taxonomy in the corresponding "Default Value" field.
Was this information helpful?