Prune Users

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

Re: Prune Users

#11

Post by jan_2017 » 13 Aug 2018, 16:04

It works perfectly for me. Thanks Kasimi for this extension.

User avatar
jan_2017
Distinguished Donor
Posts: 120
Joined: 13 May 2017, 18:07

Re: Prune Users

#12

Post by jan_2017 » 13 Aug 2018, 22:32

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: 729
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: Prune Users

#13

Post by kasimi » 14 Aug 2018, 09:55

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: 120
Joined: 13 May 2017, 18:07

Re: Prune Users

#14

Post by jan_2017 » 14 Aug 2018, 17:01

Ok , thanks.

Bye Jan

User avatar
jan_2017
Distinguished Donor
Posts: 120
Joined: 13 May 2017, 18:07

Re: Prune Users

#15

Post by jan_2017 » 25 Aug 2018, 08:30

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: 729
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: Prune Users

#16

Post by kasimi » 25 Aug 2018, 08:35

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: 120
Joined: 13 May 2017, 18:07

Re: Prune Users

#17

Post by jan_2017 » 25 Aug 2018, 13:38

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: 729
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: Prune Users

#18

Post by kasimi » 25 Aug 2018, 14:23

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
Donor
Posts: 152
Joined: 22 Oct 2016, 18:22
Location: My castle

Re: Prune Users

#19

Post by terry2 » 25 Aug 2018, 21:52

Unless he is like some of my friends and never pays it back lol.

User avatar
jan_2017
Distinguished Donor
Posts: 120
Joined: 13 May 2017, 18:07

Re: Prune Users

#20

Post by jan_2017 » 27 Aug 2018, 06:28

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest