Topic: Automatic clean old unverified users

Hello.

I do not know why, but this part of file (register.php) :

$query = array(
'DELETE' => 'users',
'WHERE' => 'group_id='.FORUM_UNVERIFIED.' AND activate_key IS NOT NULL AND registered < '.(time() - 259200)
);

is never excuted on my board (while several users daily register).

So I have to manually delete old unverified users.

Does it work on your forum?

Thank you.

Re: Automatic clean old unverified users

How you known that is never executed?

3 (edited by progent 2014-02-28 15:50)

Re: Automatic clean old unverified users

Hello.
Because yesterday I had several hundreds unverified users in my database registered + 259200 seconds, and it wasn't the first time I had to delete them myself.
I specify that the request works by testing it in phpmyadmin (I tried with a select instead of delete).

Re: Automatic clean old unverified users

Maybe activate_key IS NULL in your case. Or group_id IS NOT FORUM_UNVERIFIED

5 (edited by progent 2014-03-01 18:08)

Re: Automatic clean old unverified users

Ok, many thanks, group_id is ok, but I think you are right about activate_key.

Edit : it works with only :

'WHERE'        => 'group_id='.FORUM_UNVERIFIED.' AND registered < '.(time() - 259200)

Re: Automatic clean old unverified users

Seems like you dont activate account email verification. Activate_key is used by email verification system.

Re: Automatic clean old unverified users

o_regs_verify is set to "1" in my database and "Require verification of all new registrations by email." is checked in
admin/settings.php?section=registration (new members receive a verification mail with a link to confirm their registration).

So it is certainly another modification I made somewhere. big_smile