Closed Banana828 closed 3 months ago
Hi @Banana828 - You have an issue with retrieving the user ID.
Change this:
foreach ($users as $user_id) {
um_fetch_user($user_id);
UM()->user()->delete(false);
}
to
foreach ( $users as $user ) {
um_fetch_user( $user->ID );
UM()->user()->delete();
}
You may also check our new implementation in this file: https://github.com/ultimatemember/Extended/blob/main/src/um-cron-delete/src/Core.php#L27-L59
Hi @champsupertramp
I changed the code as you suggested, but it still isn't working.
This is the user:
I have copied the code of the link you gave, but nothing seems to be happening. It should delete the user, but it doesn't.
Hello,
I am trying to delete users that keep on the status "awaiting email confirmation". I installed the plugin, but I don't see it anywhere in my WordPress admin.
Then I found this piece of code:
And I installed WP Control. I can see the scheduled task, but when I say 'run now' nothing happens. I have a user registered on April 1st and the status is 'awaiting_email_confirmation'.
I created another scheduled event with some database action, really low-key. When it runs it should add something to a table. When I run that it works.
What am I missing?