Filter
rpress_user_pending_verification
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#
| Parameter | Type | Description |
|---|---|---|
$is_pending | bool | True when the pending meta is set. |
$user_id | int | ID 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), inrpress_user_pending_verification()
See also#
Was this page helpful?
