Fork me on GitHub

next_ad_int_user

after_enable

next_ad_int_user_after_enable (WP_User $wpUser, bool $isRestored);

Hook after user has been enabled.

Description

After the user has been enabled this hook is called.

Parameters

WP_User $wpUser

Enabled user object

bool $isRestored

Is true if the user has been previously been marked as disabled and is now enabled. You have to re-lookup the user's data to get the new email address.

after_disable

next_ad_int_user_after_disable (WP_User $wpUser);

Hook after user has been disabled.

Description

After the user has been disabled this hook is called.

Parameters

WP_User $wpUser

Disabled user object

after_create

next_ad_int_user_after_create (NextADInt_Adi_User $adiUser, boolean $syncToWordPress = false, $writeUserMeta = true);

This hook is called after a new user has been created but before any updates (password, email etc.) has been made.

Description

The creation could have been triggered by a normal login, an execution of Test authentication or Sync to WordPress.

Parameters

NextADInt_Adi_User $adiUser

Previously created user. You can get its WordPress user id by accessing

$adiUser->getId()
boolean $syncToWordPress = false

Flag if the creation has been triggered by Sync to WordPress.

boolean $writeUserMeta = true

Flag if the user's Active Directory meta data should be written back to WordPress.

before_update

next_ad_int_user_before_update(NextADInt_Adi_User $adiUser, boolean $syncToWordPress = false, $writeUserMeta = true);

This hook is called before any new value of the user gets written to the WordPress database.

Description

The hook is called after next_ad_int_user_after_create if the user has been previously created. The hook itself could have been triggered by a normal login, an execution of Test authentication or by Sync to WordPress.

Parameters

NextADInt_Adi_User $adiUser

User to be updated. You can get its WordPress user id by accessing

$adiUser->getId()

The user's LDAP attributes can be retrieved by accessing

$ldapAttributes = $adiUser->getLdapAttributes();
// or
// $rawLdapAttributes = $adiUser->getLdapAttributes()->getRaw();
boolean $syncToWordPress = false

Flag if the creation has been triggered by Sync to WordPress.

boolean $writeUserMeta = true

Flag if the user's Active Directory meta data should be written back to WordPress.

after_update

next_ad_int_user_after_update(NextADInt_Adi_User $adiUser, WP_User $wpUser, boolean $syncToWordPress = false, $writeUserMeta = true);

This hook is called after all updates of the user's data got written to the WordPress database.

Description

The hook is called after next_ad_int_user_before_update and only if all previous updates (set email, update password etc.) have succeeded.

Parameters

NextADInt_Adi_User $adiUser

The user which has been updated. You can get its WordPress user id by accessing

$adiUser->getId()

The user's LDAP attributes can be retrieved by accessing

$ldapAttributes = $adiUser->getLdapAttributes();
// or
// $rawLdapAttributes = $adiUser->getLdapAttributes()->getRaw();
WP_User $wpUser

The WordPress user instance of the updated user containing the latest data.

boolean $syncToWordPress = false

Flag if the creation has been triggered by Sync to WordPress.

boolean $writeUserMeta = true

Flag if the user's Active Directory meta data should be written back to WordPress.