action
Fires after an unverified user updates their email address.
Parameters of davo_account_email_changed Parameter Type Description $user_id int WordPress user ID. $new_email string Updated email address. $old_email string Previous unverified email address.
add_action Copyadd_action ( 'davo_account_email_changed' , 'my_action_callback' , 10 , 3 );
/**
* @param int $user_id
* @param string $new_email
* @param string $old_email
*/
function my_action_callback ( $user_id , $new_email , $old_email ) {
// Your code here.
}src/domains/auth/repository.php:992, and 1 more place
action
Fires after an account is created on someone's behalf.
Parameters of davo_auth_account_created_by_staff Parameter Type Description $user_id int New account's user ID. $creator_id int User ID of the person who created it.
add_action Copyadd_action ( 'davo_auth_account_created_by_staff' , 'my_action_callback' , 10 , 2 );
/**
* @param int $user_id
* @param int $creator_id
*/
function my_action_callback ( $user_id , $creator_id ) {
// Your code here.
}src/domains/auth/repository.php:305
action
Fires when an account is locked after too many failed sign-in attempts (15 by default).
Parameters of davo_auth_account_locked Parameter Type Description $user_id int The locked user's ID. $identifier string The rate-limit identifier that reached the threshold.
add_action Copyadd_action ( 'davo_auth_account_locked' , 'my_action_callback' , 10 , 2 );
/**
* @param int $user_id
* @param string $identifier
*/
function my_action_callback ( $user_id , $identifier ) {
// Your code here.
}src/domains/auth/services/rate-limit.php:341
filter
Filters the account-wide sign-in rate limit steps. Every failed attempt against an account counts, whatever address it came from.
Parameters of davo_auth_account_rate_limit_thresholds Parameter Type Description $thresholds array<int, int> Failed attempts => seconds to wait. Defaults to 15 => 5 minutes, 25 => 15 minutes, 40 => 1 hour.
Returns array<int, int>
add_filter Copyadd_filter ( 'davo_auth_account_rate_limit_thresholds' , 'my_filter_callback' , 10 , 1 );
/**
* @param array<int, int> $thresholds
*/
function my_filter_callback ( $thresholds ) {
// Change $thresholds as needed, then return it.
return $thresholds ;
}src/domains/auth/services/rate-limit.php:186
filter
Filters how long failed sign-in attempt records are kept before the daily cleanup removes them. Defaults to 7 days.
Parameters of davo_auth_attempt_retention Parameter Type Description $seconds int Retention in seconds.
Returns int
add_filter Copyadd_filter ( 'davo_auth_attempt_retention' , 'my_filter_callback' , 10 , 1 );
/**
* @param int $seconds
*/
function my_filter_callback ( $seconds ) {
// Change $seconds as needed, then return it.
return $seconds ;
}src/domains/auth/crons/cleanup.php:94
filter
Filters how long the sign-in audit log is kept before the cleanup removes entries. Defaults to 365 days.
Parameters of davo_auth_audit_retention Parameter Type Description $seconds int Retention in seconds.
Returns int
add_filter Copyadd_filter ( 'davo_auth_audit_retention' , 'my_filter_callback' , 10 , 1 );
/**
* @param int $seconds
*/
function my_filter_callback ( $seconds ) {
// Change $seconds as needed, then return it.
return $seconds ;
}src/domains/auth/crons/cleanup.php:105
action
Fires when the sign-in cleanup job finishes.
Parameters of davo_auth_cleanup_complete Parameter Type Description $deleted_tokens int Number of expired tokens deleted. $deleted_attempts int Number of old attempt records deleted.
add_action Copyadd_action ( 'davo_auth_cleanup_complete' , 'my_action_callback' , 10 , 2 );
/**
* @param int $deleted_tokens
* @param int $deleted_attempts
*/
function my_action_callback ( $deleted_tokens , $deleted_attempts ) {
// Your code here.
}src/domains/auth/crons/cleanup.php:121
action
Fires after a user's email is verified.
Parameters of davo_auth_email_verified Parameter Type Description $user_id int WordPress user ID.
add_action Copyadd_action ( 'davo_auth_email_verified' , 'my_action_callback' , 10 , 1 );
/**
* @param int $user_id
*/
function my_action_callback ( $user_id ) {
// Your code here.
}src/domains/auth/repository.php:750
filter
Filters the initial auth state printed on the page.
Parameters of davo_auth_initial_state Parameter Type Description $state array<string, mixed> Initial state. $user WP_User|null Current user, or null when logged out.
add_filter Copyadd_filter ( 'davo_auth_initial_state' , 'my_filter_callback' , 10 , 2 );
/**
* @param array<string, mixed> $state
* @param WP_User|null $user
*/
function my_filter_callback ( $state , $user ) {
// Change $state as needed, then return it.
return $state ;
}src/domains/auth/helpers.php:434
filter
Filters the per-address sign-in rate limit steps, which stop an attacker rotating email addresses from one address.
Parameters of davo_auth_ip_rate_limit_thresholds Parameter Type Description $thresholds array<int, int> Failed attempts => seconds to wait. Defaults to 20 => 1 minute, 30 => 5 minutes, 45 => 15 minutes, 70 => 1 hour.
Returns array<int, int>
add_filter Copyadd_filter ( 'davo_auth_ip_rate_limit_thresholds' , 'my_filter_callback' , 10 , 1 );
/**
* @param array<int, int> $thresholds
*/
function my_filter_callback ( $thresholds ) {
// Change $thresholds as needed, then return it.
return $thresholds ;
}src/domains/auth/services/rate-limit.php:206
filter
Filter whether an unverified user is restricted from performing a specific action scope.
Parameters of davo_auth_is_user_action_restricted Parameter Type Description $restricted bool Whether the action is restricted. $user_id int WordPress user ID. $scope string Action scope slug.
add_filter Copyadd_filter ( 'davo_auth_is_user_action_restricted' , 'my_filter_callback' , 10 , 3 );
/**
* @param bool $restricted
* @param int $user_id
* @param string $scope
*/
function my_filter_callback ( $restricted , $user_id , $scope ) {
// Change $restricted as needed, then return it.
return $restricted ;
}src/domains/auth/helpers.php:676
filter
Filters how long a locked account stays locked before it unlocks itself. Defaults to one day.
Parameters of davo_auth_lock_duration Parameter Type Description $seconds int Lock duration in seconds.
Returns int
add_filter Copyadd_filter ( 'davo_auth_lock_duration' , 'my_filter_callback' , 10 , 1 );
/**
* @param int $seconds
*/
function my_filter_callback ( $seconds ) {
// Change $seconds as needed, then return it.
return $seconds ;
}src/domains/auth/services/rate-limit.php:398
action
This action is documented in Auth_Repository::login(). */
Passed to callbacks: $user_id$session['session_id']
add_action Copyadd_action ( 'davo_auth_login_success' , 'my_action_callback' , 10 , 2 );
function my_action_callback ( $arg1 , $arg2 ) {
// Your code here.
}src/domains/auth/repository.php:188, and 1 more place
action
Fires after a user logs out.
Parameters of davo_auth_logout Parameter Type Description $user_id int WordPress user ID. $session_token string The WP session token that was destroyed.
add_action Copyadd_action ( 'davo_auth_logout' , 'my_action_callback' , 10 , 2 );
/**
* @param int $user_id
* @param string $session_token
*/
function my_action_callback ( $user_id , $session_token ) {
// Your code here.
}src/domains/auth/repository.php:473
action
Fires after a user destroys all their sessions.
Parameters of davo_auth_logout_all Parameter Type Description $user_id int WordPress user ID.
add_action Copyadd_action ( 'davo_auth_logout_all' , 'my_action_callback' , 10 , 1 );
/**
* @param int $user_id
*/
function my_action_callback ( $user_id ) {
// Your code here.
}src/domains/auth/repository.php:504
action
Fires after a user signs out all other devices except the current one.
Parameters of davo_auth_logout_others Parameter Type Description $user_id int WordPress user ID. $session_token string The WP session token that was preserved.
add_action Copyadd_action ( 'davo_auth_logout_others' , 'my_action_callback' , 10 , 2 );
/**
* @param int $user_id
* @param string $session_token
*/
function my_action_callback ( $user_id , $session_token ) {
// Your code here.
}src/domains/auth/repository.php:1180, and 1 more place
action
Fires after a user logs in via magic link.
Parameters of davo_auth_magic_login Parameter Type Description $user_id int WordPress user ID.
add_action Copyadd_action ( 'davo_auth_magic_login' , 'my_action_callback' , 10 , 1 );
/**
* @param int $user_id
*/
function my_action_callback ( $user_id ) {
// Your code here.
}src/domains/auth/repository.php:1094
filter
Filters the minimum password length. Defaults to 8.
Parameters of davo_auth_password_min_length Parameter Type Description $length int Minimum length in characters.
Returns int
add_filter Copyadd_filter ( 'davo_auth_password_min_length' , 'my_filter_callback' , 10 , 1 );
/**
* @param int $length
*/
function my_filter_callback ( $length ) {
// Change $length as needed, then return it.
return $length ;
}src/domains/auth/helpers.php:298, and 1 more place
action
Fires after a password reset is completed.
Parameters of davo_auth_password_reset Parameter Type Description $user_id int WordPress user ID.
add_action Copyadd_action ( 'davo_auth_password_reset' , 'my_action_callback' , 10 , 1 );
/**
* @param int $user_id
*/
function my_action_callback ( $user_id ) {
// Your code here.
}src/domains/auth/repository.php:693
action
Fires when a password reset email is sent.
Parameters of davo_auth_password_reset_requested Parameter Type Description $user_id int WordPress user ID.
add_action Copyadd_action ( 'davo_auth_password_reset_requested' , 'my_action_callback' , 10 , 1 );
/**
* @param int $user_id
*/
function my_action_callback ( $user_id ) {
// Your code here.
}src/domains/auth/repository.php:638, and 1 more place
filter
Filters the sign-in rate limit steps. A user is made to wait longer after each failed attempt.
Parameters of davo_auth_rate_limit_thresholds Parameter Type Description $thresholds array<int, int> Failed attempts => seconds to wait. Defaults to 5 => 1 minute, 6 => 5 minutes, 7 => 15 minutes, 8 => 30 minutes, 9 => 1 hour.
Returns array<int, int>
add_filter Copyadd_filter ( 'davo_auth_rate_limit_thresholds' , 'my_filter_callback' , 10 , 1 );
/**
* @param array<int, int> $thresholds
*/
function my_filter_callback ( $thresholds ) {
// Change $thresholds as needed, then return it.
return $thresholds ;
}src/domains/auth/services/rate-limit.php:446
action
Fires after a new user account is registered.
Parameters of davo_auth_registered Parameter Type Description $user_id int WordPress user ID.
add_action Copyadd_action ( 'davo_auth_registered' , 'my_action_callback' , 10 , 1 );
/**
* @param int $user_id
*/
function my_action_callback ( $user_id ) {
// Your code here.
}src/domains/auth/repository.php:172, and 1 more place
filter
Filters whether registration is open. Defaults to the allow_registration setting, which is off until the owner turns it on.
Parameters of davo_auth_registration_allowed Parameter Type Description $allowed bool Whether registration is allowed.
Returns bool
add_filter Copyadd_filter ( 'davo_auth_registration_allowed' , 'my_filter_callback' , 10 , 1 );
/**
* @param bool $allowed
*/
function my_filter_callback ( $allowed ) {
// Change $allowed as needed, then return it.
return $allowed ;
}src/domains/auth/repository.php:88
action
Fires when a login has failed nine times in the rate-limit window, so a security alert can be sent.
Parameters of davo_auth_security_alert_threshold Parameter Type Description $email string Email address that was tried. $ip_address string Address the attempts came from. $count int Number of recent failed attempts.
add_action Copyadd_action ( 'davo_auth_security_alert_threshold' , 'my_action_callback' , 10 , 3 );
/**
* @param string $email
* @param string $ip_address
* @param int $count
*/
function my_action_callback ( $email , $ip_address , $count ) {
// Your code here.
}src/domains/auth/services/rate-limit.php:326
filter
Filters how long a session may sit inactive before the cleanup removes it. Defaults to 60 days.
Parameters of davo_auth_session_inactivity Parameter Type Description $seconds int Inactivity period in seconds.
Returns int
add_filter Copyadd_filter ( 'davo_auth_session_inactivity' , 'my_filter_callback' , 10 , 1 );
/**
* @param int $seconds
*/
function my_filter_callback ( $seconds ) {
// Change $seconds as needed, then return it.
return $seconds ;
}src/domains/auth/crons/cleanup.php:113
filter
Filters the geo-IP location resolved for a session IP address.
Return a non-empty string to supply a location. Returning an empty string (the default) causes the Sessions UI to omit the location field.
Parameters of davo_auth_session_location Parameter Type Description $location string Empty string — populate via your geo-IP provider. $ip_address string The IP address to resolve.
add_filter Copyadd_filter ( 'davo_auth_session_location' , 'my_filter_callback' , 10 , 2 );
/**
* @param string $location
* @param string $ip_address
*/
function my_filter_callback ( $location , $ip_address ) {
// Change $location as needed, then return it.
return $location ;
}src/domains/auth/services/security.php:178
action
Fires after a single session has been revoked from the Sessions UI.
Parameters of davo_auth_session_revoked Parameter Type Description $user_id int WordPress user ID. $session_id int Davo session record ID that was removed.
add_action Copyadd_action ( 'davo_auth_session_revoked' , 'my_action_callback' , 10 , 2 );
/**
* @param int $user_id
* @param int $session_id
*/
function my_action_callback ( $user_id , $session_id ) {
// Your code here.
}src/domains/auth/services/session.php:372
filter
Filters the role given to an account created on someone's behalf.
Parameters of davo_auth_staff_account_role Parameter Type Description $role string Role slug. Default 'subscriber'. $creator_id int User ID of the person creating the account.
add_filter Copyadd_filter ( 'davo_auth_staff_account_role' , 'my_filter_callback' , 10 , 2 );
/**
* @param string $role
* @param int $creator_id
*/
function my_filter_callback ( $role , $creator_id ) {
// Change $role as needed, then return it.
return $role ;
}src/domains/auth/repository.php:266
filter
Filters how long a one-time token stays valid. Defaults are 1 hour for password reset, 1 day for email verification, 15 minutes for magic sign-in links and 30 days for remember-me.
Parameters of davo_auth_token_expiry Parameter Type Description $seconds int Validity in seconds. $type string Token type.
Returns int
add_filter Copyadd_filter ( 'davo_auth_token_expiry' , 'my_filter_callback' , 10 , 2 );
/**
* @param int $seconds
* @param string $type
*/
function my_filter_callback ( $seconds , $type ) {
// Change $seconds as needed, then return it.
return $seconds ;
}src/domains/auth/services/token.php:98, and 1 more place
filter
Filters the Davo auth user response.
Parameters of davo_auth_user_response Parameter Type Description $response array<string, mixed> User response payload. $user WP_User WordPress user object.
add_filter Copyadd_filter ( 'davo_auth_user_response' , 'my_filter_callback' , 10 , 2 );
/**
* @param array<string, mixed> $response
* @param WP_User $user
*/
function my_filter_callback ( $response , $user ) {
// Change $response as needed, then return it.
return $response ;
}src/domains/auth/helpers.php:402