View Full Version : Find, Optionally Email and Optionally Delete Inactive Members
amykhar
02-15-2003, 10:00 PM
This hack is designed to allow you to:
a) Find users who have not logged in to your board in X days. X is configurable by you in the control panel.
b) Email the inactive users. When the email is set, the date is recorded so that you will not email them again within X days
c) Delete the inactive users. This can happen in two ways:
1) If you don't have email users set, it will simply delete users who have not logged in to your forums in the past X days.
2) If you have emails turned on, it will delete users who have not logged in during the past X days AND who were sent the warning email more than 15 days before.
The email is a template configurable by you.
Here is how this hack will behave:
If you have email on and delete off, it will email inactive users every X days.
If you have email on and delete on, it will email a warning then delete 15 days later.
If you have emails off and delete on, it will delete users who have been incactive for X days.
If you have email off and delete off, it will list the inactive users for you in a very crude plain text list.
This is not a hack for newbies. If you don't know how to run Queries, don't touch this hack. It is still In Beta. If I get bored and ambitious, I will write an install script and make it idiot-proof.
Screen Shots to Follow
I will Support this hack for users with some hacking experience. I will fix bugs. I will not teach hacking basics though.
!Important - After You Install the hack, go to your Control Panel and Set the Options! Otherwise it will NOT work.
amykhar
02-16-2003, 12:13 AM
This shows that this hack is configured under the Options Section of your Control Panel.
amykhar
02-16-2003, 12:14 AM
Configuring the Options is easy:
Koutaru
02-16-2003, 12:55 AM
Great hack! I know a lot of people who are looking for this-- I'll check it out :)
afterlab
02-16-2003, 01:26 AM
Nice. A great use for us over at FFR. Thanks greatly.
amykhar
02-16-2003, 01:29 AM
Let me know how it works, OK? The email message template needs work. You should probably include the url to your board and maybe a link to the reset password form.
Amy
empreur76
02-16-2003, 08:09 AM
great hack !! thx
Tim Wheatley
02-16-2003, 09:24 AM
Yeah it works, needed to make some small mods etc, but it certainly works fine. Superb work. :)
One problem I had was with running the query to enter 68,Inactivememberoptions,68 into the settinggroupid table. I did it manually - not sure if there's a problem with your query?
ULTIMATESSJ
02-16-2003, 11:48 AM
heh great, a hack i've always wanted
/me licks install
JulianD
02-16-2003, 02:32 PM
Does it use some kind of cron?
amykhar
02-16-2003, 03:51 PM
You can either run it manually or set up a cron job. I recommend cron but explaining how to set that part up is beyond the scope of this hack because it is different on different web hosts.
Amy
amykhar
02-16-2003, 03:51 PM
BTW, if you run it manually, make SURE you install the new templates on the style that you typically use to browse. Otherwise, you will send out blank emails.
diettalk
02-16-2003, 05:30 PM
When the user gets deleted.. the posts are removed too?
amykhar
02-16-2003, 05:55 PM
Originally posted by diettalk
When the user gets deleted.. the posts are removed too?
No. They are not.
Amy
tkeil69575
02-16-2003, 07:58 PM
hi amy,
thank you for this great hack :)
i have a couple of questions. the variable $daysInactive in the inactiveEmailMessage template doesnt seem to be working. its not including the number of days inactive in the email.
Is it correct the in the colum emailDate in the user table all values are "127" ? and that they dont change when users are emailed? I have a feeling there should be a unix timestamp in there? or is that the 15 days value?
thanks for your help
tina
amykhar
02-16-2003, 08:03 PM
Originally posted by tkeil69575
hi amy,
thank you for this great hack :)
i have a couple of questions. the variable $daysInactive in the inactiveEmailMessage template doesnt seem to be working. its not including the number of days inactive in the email.
Is it correct the in the colum emailDate in the user table all values are "127" ? and that they dont change when users are emailed? I have a feeling there should be a unix timestamp in there? or is that the 15 days value?
thanks for your help
tina
You caught a glitch in the install instructions. Change the emailDate to Int instead of TinyInt and it should fix that problem.
Regarding the $daysInactive, it worked for me. I will look into it.
I have updated the zip file reflecting the query change.
tkeil69575
02-16-2003, 08:05 PM
great stuff - thanks amy :)
amykhar
02-16-2003, 08:11 PM
Found the problem. In the message template, change daysInactive to inactiveDays. That should do it.
tkeil69575
02-16-2003, 08:18 PM
yep that did it - working great now - thanks
amykhar
02-16-2003, 08:19 PM
No prob. Thanks for helping to test it.
Amy
Dean C
02-17-2003, 03:43 PM
Sounds good so far... I'll wait till this is out of beta before i install :)
Regards
- miSt
amykhar
02-17-2003, 04:28 PM
I am going to give it a few more days. I think It's good to go, but want to wait and see if anyone else has issues.
Amy
Does this email every users with xxx inactive days regardless of their usergroup? I have a seperate usergroup 'inactive' which holds all members who were inactive for a year and longer. I want to test it on myself first though (by manually putting myself to 365 inactive days)
Great hack! Absolutely what I've been waiting for!
/me clicks *installed*
- djr
amykhar
02-17-2003, 09:59 PM
Regardless of the user group, it emails them.
Amy
Sorry, already found out! The answer is obviously in the output of manageInactive.php :)
Ok, have to set myself to a longer inactive time then! ;)
Thanks for the prompt answer :cool:
- djr
I'm having troubles, or I don't understand the hack. It installed without problems. I've set the options 'Email' and 'Delete' both to ON, so users will be warned first, wait for 15 days and then deleted if I understood correctly?
I add a user via vB Admin CP with the following info:
Username: Testuser
Usergroup: Inactive
Join Date: 1999-01-01 01:00:00
Last Activity: 1999-01-01 01:00:00 (same for Last Post and Last Visit)
All other relevant info set.
Fire up manageInactive.php. Output: Email Testuser
And boom! The user is deleted immediately, instead of waiting for fifteen days.
The e-mail got sent out, though (I used my own email-address). When I search for 'Testuser' in phpMyAdmin in the User table, NADA! Same for vB Admin CP.
What am I doing wrong? Please advise.
- djr
amykhar
02-18-2003, 07:24 PM
I know what the problem is. Back in a sec with the fix.
Amy
amykhar
02-18-2003, 07:28 PM
K, fixed. I updated the zip file. To upgrade, open your manageInactive.php and
Find:
$DB_site->query("UPDATE user set emailDate=".time()." WHERE userid=$user[userid]");
Add After
$user[emailDate] = time();
Thanks for the quick fix!
I have been looking up and down the .php file, but just couldn't find it.. shows I'm better at hacking than coding ;)
All working great now.
If you want the lost password added to the message:
If you lost your password for $bbtitle, please click the following link and follow the procedure. A new password will be set and emailed to you.
$bbtitle/member.php?s=&action=lostpw
Sorry, back again :cool:
As this hacks only deletes the user, but leaves the redundant user settings (customavatar, private messages, etc etc) in the db, I was wondering if it's possible to update this hack so it deletes everything bound to that userid?
In admin/user.php there's already the php code for it (find // ###################### Start Remove #######################). Or maybe alot easier, just redirect to the user.php with all the paramaters necessary (userid, http_action 'kill'). I'd love to do it myself, but as said in my earlier post, I can't code :-(
Thanks for looking into it!
- djr
amykhar
02-18-2003, 08:40 PM
No prob djr. I shall get right on it and be back with a fix.
Amy
amykhar
02-18-2003, 09:10 PM
updated the zip. All you need to do is upload the php file again.
I recommend renaming this script to something else on your server for security reasons. I haven't been able to find a way to pass in the username and password for a cron job to be able to run this in the admin folder yet.
Hi amy,
The hack gets better and better! Thank you VERY MUCH for implementing all my feat reqs.
I have (what's new) another one :D Because most of the forum-admins will run this script as cronjob, it's probably nicer to have the output how many users (and optionally which usernames) are deleted emailed to the admin. If there's no pruning done, have the script e-mail that, so we know it's up and running and doin' its (very good) job!
If somebody can be of help to Amy for dealing with potentially security risks, please don't hesitate! In the meantime i've renamed the script to something insignificant ;)
Thanks again!
- djr
amykhar
02-19-2003, 06:44 PM
The email is a good idea. I will do it tomorrow cause I'm working on somebody else's hack right now. :)
Amy
amykhar
02-23-2003, 11:43 PM
OK. I just updated the zip file. The program now emails the webmaster email with information about members who were emailed or deleted.
To update: You will need to add the two new templates and reupload the zip file.
Within the templates, you have access to counts telling how many inactive members there are, how many were emailed, how many were deleted, and list the emailed or deleted members.
Amy
Hi Amy,
I forgot to say thank you for all that you've added to the hack. Major thumbs up for making this an excellent hack for the very hard needed forum maintenance a.k.a spring cleaning :D
I love everything about this hack. The fact it's fully automated via cron, the fact it keeps us webmasters notified of its duty and the fact that I feel assured that no redundant user info is left behind in the db!
This is definitely in my Top 10 list of favourite hacks!
- djr
amykhar
02-25-2003, 05:14 PM
Thank you, djr :)
Amy
hypedave
02-26-2003, 10:46 PM
So bascially, If I set it to 30 Days, then it will look users that havent been active in 30 Days send them an email warning, then in 15 days if that person hasn't logged on then their account will be automatically deleted.
amykhar
02-26-2003, 10:49 PM
Yes Dave - if you have both email and delete turned on, that's how it will work.
Amy
hypedave
02-27-2003, 01:15 PM
Is there a way to exempt posters with XX amount of posts?
Some users may have like 100 post, and get real busy with school and can't log on for like 2 months.
That would be a nice add-on
amykhar
02-27-2003, 01:33 PM
Exempt for the email or just the delete?
hypedave
02-28-2003, 01:28 AM
Originally posted by amykhar
Exempt for the email or just the delete?
Just the delete I suppose
amykhar
02-28-2003, 01:19 PM
Originally posted by hypedave
Just the delete I suppose
Here ya go:
in manageInactive.php Find:
$userArray=$DB_site->query("SELECT username,userid,email,adminemail,emailDate FROM user WHERE lastactivity<$cutoffdate and emailDate<$dateCut ORDER BY username");
Replace with:
$userArray=$DB_site->query("SELECT username,userid,email,posts,adminemail,emailDate FROM user WHERE lastactivity<$cutoffdate and emailDate<$dateCut ORDER BY username");
Find:
// We are just going to delete the inactive users with no warning
$DB_site->query("UPDATE post SET username='".addslashes($user[username])."',userid=0 WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM user WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM userfield WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM access WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM calendar_events WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM customavatar WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM moderator WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM privatemessage WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM subscribeforum WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM subscribethread WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM session WHERE userid='$user[userid]'");
$countDelete++;
$inactiveUsersDeleted .=$user[username]."\n";
echo("Deleted ". $user[username]."<br>");
Replace with: (change X to be the number of posts you choose)
if($user[posts] < X) {
// We are just going to delete the inactive users with no warning
$DB_site->query("UPDATE post SET username='".addslashes($user[username])."',userid=0 WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM user WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM userfield WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM access WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM calendar_events WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM customavatar WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM moderator WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM privatemessage WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM subscribeforum WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM subscribethread WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM session WHERE userid='$user[userid]'");
$countDelete++;
$inactiveUsersDeleted .=$user[username]."\n";
echo("Deleted ". $user[username]."<br>");
}
Find:
if($user[emailDate]<$dateCut) {
$DB_site->query("UPDATE post SET username='".addslashes($user[username])."',userid=0 WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM user WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM userfield WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM access WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM calendar_events WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM customavatar WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM moderator WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM privatemessage WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM subscribeforum WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM subscribethread WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM session WHERE userid='$user[userid]'");
$countDelete++;
$inactiveUsersDeleted .=$user[username]."\n";
echo("Deleted ". $user[username]."<br>");
Replace With: (Change X as above)
if ($user[posts] < X) {
if($user[emailDate]<$dateCut) {
$DB_site->query("UPDATE post SET username='".addslashes($user[username])."',userid=0 WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM user WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM userfield WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM access WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM calendar_events WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM customavatar WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM moderator WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM privatemessage WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM subscribeforum WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM subscribethread WHERE userid='$user[userid]'");
$DB_site->query("DELETE FROM session WHERE userid='$user[userid]'");
$countDelete++;
$inactiveUsersDeleted .=$user[username]."\n";
echo("Deleted ". $user[username]."<br>");
}
Limitter
03-01-2003, 07:24 AM
Nice great hack !!
THX
afterlab
03-04-2003, 11:40 AM
So far, this script is working good. I'll give you an update in 15 days. ;)
TheEDIGuy
03-05-2003, 02:08 AM
Amykhar, thank you for a great hack! I'm installed.
One quick question, before I cron this. Let's say I want to e-mail users who haven't visited in 30 days. Would I cron this to run every 30 days, or is it safe to run every day? If I run it every day, would it re-email the same people again, or would it only e-mail people who've reached their 30 days since the last run?
Does that make any sense, or is it just too late at night for me to type coherently?
amykhar
03-05-2003, 02:12 AM
You can run it every day. It won't email them again for another 30 days.
Amy
TheEDIGuy
03-05-2003, 10:55 AM
Excellent. I was pretty sure that's how it worked, but wanted to make sure before I cron'ed it.
Thank you for an excellent hack!
Kmaster
03-05-2003, 03:01 PM
possible change del user i/o move to banned group. cool hack....thx!!!
Hi Amy,
It's me again.. in a few days (Tuesday, 11th of March) I'll be losing approx. 1750 users :( They are inactive for over a year (my setting), I know, but is it possible to adjust the hack so they will be getting one last e-mail warning a day before the actual pruning?
Thanks for considering and the great updates!
@ hypedave: nice idea, updated the hack!
- djr
amykhar
03-07-2003, 09:55 PM
Originally posted by djr
Hi Amy,
It's me again.. in a few days (Tuesday, 11th of March) I'll be losing approx. 1750 users :( They are inactive for over a year (my setting), I know, but is it possible to adjust the hack so they will be getting one last e-mail warning a day before the actual pruning?
Thanks for considering and the great updates!
@ hypedave: nice idea, updated the hack!
- djr
Here is how I would do it.
1. Create a new usergroup for those who are about to be deleted. Note the usergroupid.
2. In manageInactive.php Find:
?>
Add above:
//Final Warning
$finalWarning = time() - 1036800;
$finalArray=$DB_site->query("SELECT username,userid,usergroupid,email,adminemail,email Date FROM user WHERE lastactivity<$cutoffdate and emailDate<$finalWarning ORDER BY username");
while ($users=$DB_site->fetch_array($finalArray)) {
if ($emailInactive AND $user[adminemail] AND $user[usergroupid]!=X ){
eval("\$subject = \"".gettemplate("inactiveFinalWarningSubject")."\";");
eval("\$message = \"".gettemplate("inactiveFinalMessage")."\";");
mail ($user[email],$subject,$message,"From: \"$bbtitle Mailer\" <$webmasteremail>");
$DB_site->query("UPDATE user set usergroupid=X WHERE userid='$user[userid]'");
echo("Emailed ". $user[username]."<br>");
}
(Change X in both places to the new usergroupid that you just created.)
3. Create two new templates:inactiveFinalWarningSubject and inactiveFinalMessage. Put whatever message and subject you choose in them.
Please note: THIS ADDON IS UNTESTED.
You're AWESOME! Wow, that was REAL quick. I'll let you know how it goes!
When will you be moving this out of beta? The hack is superb as is, or are you waiting for the first user who's got his board pruned :D
- djr
amykhar
03-07-2003, 10:28 PM
I am waiting for you to report sucess :D
Amy
TheEDIGuy
03-09-2003, 04:54 PM
This has been working extremely well for me, Amy.
My only "complaint" is that the first time I ran it, I had (obviously) an extremely large group of people e-mailed. Now, every day I run it, I only have 8-10. But when it hits the 31st day since the first time I ran it, it's going to grab that huge list again, minus the people who actually came back.
Since I don't use the delete option...If you use it, you don't have that problem :)
It's too bad I didn't plan ahead, and slowly decrease the number of "inactive days" when I first ran it.
amykhar
03-09-2003, 04:56 PM
Glad it's working for you :) The first delete one has me interested cause it's probably going to be rather query intensive. After the first one for larger boards though, I am not expecting any problems.
Amy
amykhar
03-14-2003, 06:11 PM
03-07-03 at 07:15 PM djr said this in Post #52 (https://vborg.vbsupport.ru/showthread.php?postid=362565#post362565)
You're AWESOME! Wow, that was REAL quick. I'll let you know how it goes!
When will you be moving this out of beta? The hack is superb as is, or are you waiting for the first user who's got his board pruned :D
- djr
So, how did the first prune go? I'm dying of curiosity.
Amy
subu1
03-18-2003, 05:21 PM
hi amy,
i have install your Hack and its work, but now i have a aktiv User there have gotten a email in 15 Days he is deleted.
why?
i dont want delete a aktiv user, he have 30 Postings and the last today
subu1
03-14-03 at 09:11 PM amykhar said this
So, how did the first prune go? I'm dying of curiosity.
Hi Amy,
Sorry, been away to CEBIT in Hannover to see new cool gadgets. The first prune went without any flaw at all, though I lost approx 1750 members. OUCH! Well, there's over 3000 left, and more joining day in day out.
I had problems with the Final Warning addon, so I removed that one again. I was getting parse errors, and due to being extremely busy didn't have the time to give it another try.
All in all I'm extremely happy with the hack. Tme to move it out of beta! :banana:
amykhar
03-18-2003, 05:42 PM
Today at 02:21 PM subu1 said this in Post #57 (https://vborg.vbsupport.ru/showthread.php?postid=368685#post368685)
hi amy,
i have install your Hack and its work, but now i have a aktiv User there have gotten a email in 15 Days he is deleted.
why?
i dont want delete a aktiv user, he have 30 Postings and the last today
subu1
Look and see what the value for his last activity is. Also, how many days do you have it set for? If he becomes active again after the email is sent, he won't be deleted.
Amy
amykhar
03-18-2003, 05:42 PM
Glad it worked for you djr :) Losing so many members must have been painful though.
Amy
Glad it worked for you djr :) Losing so many members must have been painful though.
Yeah, actually it was, but they weren't contributing anyway, so no real hard done.
I was wondering why you used lastactivity instead of lastvisit?
I have this user (which wasn't deleted):
Lastvisit: 2000-11-24 23:16:11
Lastactivity: 2003-02-24 18:05:25
Lastpost: 2000-11-24 23:11:56
I know I could easily replace lastactivity by lastvisit, but wanted to check with you first.
amykhar
03-18-2003, 06:18 PM
What's the difference between the last activity and a last visit? I think I need to research that. Either would be fine though. You could even use lastpost if you wanted to kill off lurkers.
Amy
TheEDIGuy
03-18-2003, 07:45 PM
I've found that lastactivity is more accurate. Lastvisit might not get updated if the user is visiting with cookies. I frequently have lastivits that are 2-3 days old, but the lastactivity is today, and I know they were on the site today.
What I'm more curious about - how many members did you originally e-mail about inactivity, and how many got deleted for not having visited? In other words, how many inactive members were convinced to come back because of the program?
amykhar
03-18-2003, 08:52 PM
EDIGuy, I have a confession to make. The first time I tested this hack, I didn't have the templates installed on the style I use; so I sent blank emails to over a hundred users. The blank emails actually inspired them to come see what was going on :D
Amy
If I recall well, about 150 users returned to the board out of the approx. 1750 users that were emailed. Most of the 1750 had non-working email adresses (I use a 365 year timespan)
- djr
TheEDIGuy
03-18-2003, 10:13 PM
I hate non-working e-mails. I don't do the verification, because I find it turns off prospective members. So, I have the birthday hack and this hack, and if any e-mail bounces, the user's account is deleted immediately, no questions asked. I figure I only ask them for one thing, if they can't do that, too bad.
The hack is prompting some of my missing members to return, but unfortunately, seems to be bringing back members I was happy they'd gone as well. It's a double-edged sword.
But I still love it.
amykhar
03-19-2003, 02:05 AM
EDIGuy, I was sneaky. I went and bumped the activity date of some members I would rather not see again before the emails were sent. :D
Amy
TheEDIGuy
03-19-2003, 11:30 AM
Good idea. A while back, we ran off a large group of people we were happy to see go. I deleted the accounts of the worst offenders, but the rest of them got notices when I first ran it. A couple came back (but they were much more decent without their friends around).
I still haven't hit my 30-day mark when the big reminder goes out again, but it'll be interesting for me to compare it with last month's initial send, to see how many came back.
I think my initial e-mail was 468, and now is about 14 per day.
wolfe
03-19-2003, 08:35 PM
with the other none active members list hack it only classes people as none active if they have not posted in 1 mounth can u add this to the hack please so you can have it not logged in for X days aand/or nopt posted for X days would make this hack the best around for what i does :D
amykhar
03-19-2003, 09:15 PM
Wolfe, this addon will do what you want.
In manageInactive.php find:
$countEmail = 0;
Add above:
$lastpostcut = 2592000;
Find:
$userArray=$DB_site->query("SELECT username,userid,email,adminemail,emailDate FROM user WHERE lastactivity<$cutoffdate and emailDate<$dateCut ORDER BY username");
Replace with:
$userArray=$DB_site->query("SELECT username,userid,email,adminemail,emailDate FROM user WHERE (lastpost < $lastpostcut or lastactivity<$cutoffdate) and emailDate<$dateCut ORDER BY username");
That should do it for you. Tweak the $lastpostcut to be what you want. Currently it is set for 30 days.
Note: This addon is not tested. Use at your own risk.
wolfe
03-20-2003, 08:26 PM
ok will test it out but will back up user table first lol
wolfe
03-22-2003, 01:11 PM
why don't you intergrate this page into the AdminCP before it is a Full Release
amykhar
03-22-2003, 01:35 PM
Because it is designed to run as a cron script and adding more code just adds more opportunities for installers to screw up.
If you really don't know how to do that on your own, I will post the code here as an addon.
Amy
TheEDIGuy
03-24-2003, 12:16 AM
I have it cron'ed and it works perfectly. One of the best hacks I've got installed.
Thanks again, Amy!
amykhar
03-24-2003, 01:01 AM
No problem :) Glad you like it.
Amy
hypedave
03-24-2003, 07:16 PM
Hey Amy,
I have a couple of users on my forum, that will be going on a vacation and will be gone for a uncertain amount of time, so I was wondering if possible is there a way to have to hack exclude user certain user groups, like if a member is going a vacation I can drop her of her im a different user group, or put in an option where this hackl will exclude user id's ?
Thanks
amykhar
03-24-2003, 07:25 PM
Hmmm, what about installing the "away" hack and then changing the query in manageInactive.php to
$userArray=$DB_site->query("SELECT username,userid,email,adminemail,emailDate FROM user WHERE lastactivity<$cutoffdate and emailDate<$dateCut and away==0 ORDER BY username");
This would exclude anybody who set themself as away.
Yuber
04-03-2003, 11:07 PM
Great hack thanks.
SmartGnome
04-06-2003, 09:53 AM
Hi Amy,
Great hack and it takes a lot of work out of my hands.
Djr didn't ask yet for a mod :D so I will do that.
We have a lot of leechers in the board (0-posters) so it should be nice to take them in the same sesion to warn them and delete or move them to a banned group. (I prefer the last).
Again thanks for the good work and install is clicked :banana:
Greetzz
iggy123
04-28-2003, 05:35 PM
is there anyway of setting this hack up so that it does include people in a certain usergroup ie admins / moderators
hypedave
04-28-2003, 05:36 PM
Today at 01:35 PM iggy123 said this in Post #80 (https://vborg.vbsupport.ru/showthread.php?postid=388517#post388517)
is there anyway of setting this hack up so that it does include people in a certain usergroup ie admins / moderators
Yeah that will be like a nice add on, I have users that take vacations, so it would be nice to place them in a temporary vacation group, and have that group id be un touch by this hack, what ya think Amy?
amykhar
04-28-2003, 05:49 PM
it would be cake for you to adjust the query. Just change the "WHERE lastactivity<$cutoffdate and emailDate<$dateCut" to "WHERE lastactivity<$cutoffdate and emailDate<$dateCut and usergroupid != X"
With X being the usergroup you want to exclude.
Amy
iggy123
04-28-2003, 09:06 PM
Today at 07:49 PM amykhar said this in Post #82 (https://vborg.vbsupport.ru/showthread.php?postid=388527#post388527)
it would be cake for you to adjust the query. Just change the "WHERE lastactivity<$cutoffdate and emailDate<$dateCut" to "WHERE lastactivity<$cutoffdate and emailDate<$dateCut and usergroupid != X"
With X being the usergroup you want to exclude.
Amy
if i were to alter it too
"WHERE lastactivity<$cutoffdate and emailDate<$dateCut and usergroupid != X and usergroupid! = Y"
would it include both the groups?
iggy123
04-28-2003, 09:15 PM
$userArray=$DB_site->query("SELECT username,userid,email,adminemail,emailDate FROM user WHERE lastactivity
<$cutoffdate and emailDate<$dateCut and away==0 ORDER BY username");
This would exclude anybody who set themself as away. [/B]
shouldnt that be
$userArray=$DB_site->query("SELECT username,userid,email,adminemail,emailDate FROM user
WHERE lastactivity<$cutoffdate and emailDate<$dateCut and away =0 ORDER BY username");
Sorry if i am wrong but i don't know much php etc and it just looked incorrect.
amykhar
04-29-2003, 11:51 AM
Yes, iggy. You caught a typo. Thanks.
Amy
hypedave
04-29-2003, 06:04 PM
also would there be away to get a report of what user accounts are in the process of being deleted if they dont log back on after the notification email?
amykhar
04-29-2003, 07:52 PM
I thought this one emailed the admins? Don't remember and am too lazy to scroll back up. If it doesn't find the hack that deletes members who never click the validation link and grab the email code from that.
Amy
iggy123
04-29-2003, 07:53 PM
yea it does mail the admin well i got one anyhow LOL
GaleForce
04-29-2003, 08:03 PM
This hack looks cool, I'm going to probably install it later. Its so tedious doing a find users by last post date, since you need to format the date in a weird way and email them individually :)
Cyricx
06-02-2003, 09:36 PM
NM, problem fixed. User Error ;)
Question, can we make this hack run only on a specific usergroup?
For example, registered members (usergroupid 2).
allan grossman
07-05-2003, 03:47 AM
I have it installed and working fine.
I haven't been able to figure out how to pass a username and password to the script to run it as a cron job, though.
The job runs fine but fails due to the lack of authentication.
Help?
amykhar
07-05-2003, 12:35 PM
Today at 12:47 AM allan grossman said this in Post #91 (https://vborg.vbsupport.ru/showthread.php?postid=415426#post415426)
I have it installed and working fine.
I haven't been able to figure out how to pass a username and password to the script to run it as a cron job, though.
The job runs fine but fails due to the lack of authentication.
Help?
You uploaded the file to the wrong directory. It goes in forums and not in admin.
Amy
allan grossman
07-05-2003, 01:50 PM
*reads instructions again*
Oops.
Thank you, Amy.
kadafi_alive
01-06-2005, 07:20 AM
Does this work for VBulletin 3.0.3 as well?
walidaly
04-23-2008, 01:15 AM
this hack needs an update
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.