Prune Users

Automatically delete user accounts based on their last activity
User avatar
jan_2017
Distinguished Donor
Posts: 165
Joined: 13 May 2017, 18:07

Re: Prune Users

Post by jan_2017 »

It works perfectly for me. Thanks Kasimi for this extension.
User avatar
jan_2017
Distinguished Donor
Posts: 165
Joined: 13 May 2017, 18:07

Re: Prune Users

Post by jan_2017 »

Next Question.

What is the server load if it is checked every 60 minutes?

If I've set 1 year it doesn't have to check it every hour, right?

Bye Jan
User avatar
kasimi
mChat developer
Posts: 1112
Joined: 06 Oct 2016, 09:56
Location: Germany

Re: Prune Users

Post by kasimi »

jan_2017 wrote: 13 Aug 2018, 22:32 If I've set 1 year it doesn't have to check it every hour, right?
Yes, it does. If you set the option to keep users for 1 year, and the extension checks only once a year for expired users, a user might be deleted only after 2 years of his last activity: at 2pm today you check for expired users. A user has been inactive for 1 year minus 1 hour. So at 3pm, the user shoud be deleted, but the next check is only next year.

As a general rule, a user account is deleted when his last activity is somwhere in the range of expire time set in the ACP and expire time set in the ACP + 1 hour

This extension's server load is neglible. It runs a single query once an hour, and another few queries for each user it deletes. Nothing your board can't handle. :)
User avatar
jan_2017
Distinguished Donor
Posts: 165
Joined: 13 May 2017, 18:07

Re: Prune Users

Post by jan_2017 »

Ok , thanks.

Bye Jan
User avatar
jan_2017
Distinguished Donor
Posts: 165
Joined: 13 May 2017, 18:07

Re: Prune Users

Post by jan_2017 »

I have a question.

In ACP logs i see every day this entry:
USER - IP - 23.08.2018 - 13:21 - No users pruned
i thought it would only be checked once a year
User avatar
kasimi
mChat developer
Posts: 1112
Joined: 06 Oct 2016, 09:56
Location: Germany

Re: Prune Users

Post by kasimi »

No, it's checked once an hour. :D I explained why in the post above.

Although I have to admit that adding a log message when nothing happened doesn't make much sense. :? I might change that in the next release.
User avatar
jan_2017
Distinguished Donor
Posts: 165
Joined: 13 May 2017, 18:07

Re: Prune Users

Post by jan_2017 »

I'm sorry, I didn't understand that the last time I spoke.

The hourly test if only one year is chosen then already a lot.

Bye Jan
User avatar
kasimi
mChat developer
Posts: 1112
Joined: 06 Oct 2016, 09:56
Location: Germany

Re: Prune Users

Post by kasimi »

Imagine you've lent a friend some money. The friend can pay you back once he gets his paycheck, but that happens only once a year (what you set the ACP option to), and he can't tell you when it happens exactly. How often do you ask him if he can pay you back? Let's say you ask only once a year: you ask him today and he can't pay you back. The paycheck arrives tomorrow and he can pay you back, but you have to wait another year (minus one day) to ask him again to get your money back. So instead, it's better to ask him every hour. :D
terry2
Posts: 229
Joined: 22 Oct 2016, 18:22
Location: My castle

Re: Prune Users

Post by terry2 »

Unless he is like some of my friends and never pays it back lol.
User avatar
jan_2017
Distinguished Donor
Posts: 165
Joined: 13 May 2017, 18:07

Re: Prune Users

Post by jan_2017 »

Hello

I have a new problem now. I manually save new users to the ACP. If the new user does not log in within 1 hour, the account will be deactivated automaticly. I then have to log in every new user after the creation itself that his account is not deactivated.

Bye Jan

Who is online

Users browsing this forum: CCBot [Bot] and 3 guests