Jump to content

Inactive users


TAV1702

Recommended Posts

I know this has come up before but my search is coming up blank. I may be a bit tired today.

I am wondering if there is a code snippet or a release out there that will auto prune users who have registered and have not filed a flight within X amount of days.

I know we can auto retire pilots, but this is different. If someone has time to register, why not the time to fly a flight within a week? If they don't have time for at least one flight in a week, they should get pruned. Easy task manually for small dead airlines, but what about busy airlines?

Anyone got anything like this?

Link to comment
Share on other sites

  • Moderators

Nice one!

Now is this ONLY after a pilot has been marked as retired?

What I am after is, if pilot registers and does not fly for 7 days after, they get deleted. I already have my config set to retire them after a no flight for 3 months.

Thats a good idea, maybe the better way to do it would be add the code to the maintenence.php script and run it on a cron every other day or so, you would need to obviously get it to look at everyone with flights at 0 then loot at the join date, you could define a period and use the existing delete pilot functions to remove their account.

Link to comment
Share on other sites

Thats a good idea, maybe the better way to do it would be add the code to the maintenence.php script and run it on a cron every other day or so, you would need to obviously get it to look at everyone with flights at 0 then loot at the join date, you could define a period and use the existing delete pilot functions to remove their account.

Yeah and you know where I got that idea from too Mark :D It was a good idea they came up with.

I might have to have a look in to trying your idea and see what happens. I suck REAL bad at cron jobs though. I rarely to ever used them. I could probably throw some code together in the maint area.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...