Skip to content
Docs
Get RestroPress

Filter

rpress_user_pending_verification

Updated
On this page

Filters whether a user is pending account verification.

Runs in rpress_user_pending_verification() after reading the _rpress_pending_verification user meta. Pending users cannot edit their profile. Not called when the user ID is empty.

Parameters#

ParameterTypeDescription
$is_pendingboolTrue when the pending meta is set.
$user_idintID of the user.

Return value#

bool. True if the user is pending verification.

Example#

function my_never_pending_for_staff( $is_pending, $user_id ) {
	if ( user_can( $user_id, 'edit_posts' ) ) {
		return false;
	}
	return $is_pending;
}
add_filter( 'rpress_user_pending_verification', 'my_never_pending_for_staff', 10, 2 );

Source#

Applied in:

  • includes/user-functions.php (line 611), in rpress_user_pending_verification()

See also#

Was this page helpful?