new_user_approve_user_status_update

Perform an action when a user’s status has been updated. Will execute no matter what status is changing to.

1
2
3
4
5
6
7
8
9
10
function status_update( $user_id, $status ) {
    // add code for all status updates
    if ( 'deny' == $status ) {
        // do something when a user's status has been updated to deny
    }
    if ( 'approve' == $status ) {
        // do something when a user's status has been updated to approve
    }
}
add_action( 'new_user_approve_user_status_update', 'status_update' );
Scroll to Top