Fork me on GitHub

next_ad_int_auth

enable_login_check

next_ad_int_auth_enable_login_check (bool $enableLoginCheck) : bool $enableLoginCheck

Enable (or force disabling) the login check.

Description

The filter can be used to enable NADI's login check on sites which do not use wp-login.php to log in.

Return value

bool $enableLoginCheck

If the login check should be triggered, you must return true. If you want the login check forced to be disabled, you must return false false. If your custom filter is executed but not responsible in the current call, just return the parameter $enableLoginCheck.

Parameters

bool $enableLoginCheck

By default this will be true if user is on wp-login.php or XML-RPC is executed.

before_create_or_update_user

next_ad_int_auth_before_create_or_update_user
(NextADInt_Adi_Authentication_Credentials $credentials, array $ldapAttributes) : boolean $preCreateStatus (if false, leave createOrUpdateUser and return false to caller) 

Description

This filter can be used in order to implement custom checks validating the ldapAttributes and credentials of the user currently trying to authenticate against your Active Directory.

Return value

bool $preCreateStatus

By default this will be true.

Parameters

NextADInt_Adi_Authentication_Credentials $credentials

Credentials object that holds several information about the user trying to authenticate. (Login name, password, etc)

array $ldapAttributes

Array that holds ldapAttributes information for the user trying to authenticate.

after_create_or_update_user

next_ad_int_auth_after_create_or_update_user (NextADInt_Adi_Authentication_Credentials $credentials, $adiUser, WP_User $wpUser) : boolean|WP_User

Description

This filter can be used in order to implement custom checks validating the credentials, ldapAttributes and $wpUser of the user currently trying to authenticate against your Active Directory. You can intercept the authentication process by returning false.

Return value

bool|WP_User $wpUser

By default this filter will return the provided $wpUser object.

Parameters

NextADInt_Adi_Authentication_Credentials $credentials

Credentials object that holds several information about the user trying to authenticate. (Login name, password, etc)

NextADInt_Adi_User $adiUser

NADI User object containing the user login, roleMappings and ldapAttributes for the user trying to authenticate against the Active Directory.

WP_User $wpUser

WordPress user object containing all the information about the user currently persisted within the WordPress database.