TAV1702 Posted August 5, 2011 Report Share Posted August 5, 2011 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? Quote Link to comment Share on other sites More sharing options...
Strider Posted August 5, 2011 Report Share Posted August 5, 2011 clickity click!! The code is there. 1 Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted August 8, 2011 Author Report Share Posted August 8, 2011 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. Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted August 8, 2011 Moderators Report Share Posted August 8, 2011 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. Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted August 8, 2011 Author Report Share Posted August 8, 2011 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 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.