07385 616 522
Call Us
07385 616 522
Notifications
Clear all

wpda_locked_user

NED
 NED
(@ned)
Admin Admin
do_action('wpda_locked_user', $user, $server, $current_user->user_login);

This action fires when a user account is locked/suspended. It can fire when an administrator manually suspends a user via WordPress or when an automation (cron job) suspends an account due to billing or other reasons.

It passes $user (the user who is being suspended), $server (the server #ID) and $current_user (the person who executed the command or "WPDA" if automated)

Example:

add_action('wpda_locked_user', 'my_function', 0, 3);

function my_function($user, $server, $current_user){
    echo "The user: {$user} has been suspended by {$current_user} on server #{$server}";
}
Quote
Topic starter Posted : 16/01/2024 9:26 pm
Share: