View Full Version : [RELEASE] Resend activation e-mail
Useful when users "don't recieve the activation e-mail".
http://www.johnmiller2004.com/vbulletin/resend.txt
Shows a link to resend activation e-mail in search for user and in edit user.
Argh, it's showing up as HTML...
***********************
Resend Activation
E-mail Hack
by JohnM
***********************
In admin/user.php find:
echo "<p><a href='../member.php?action=emailpassword&email=$user[email]' target=_new>[email password]</a></p>";
After it add:
echo "<p><a href='user.php?action=resend&userid=$user[userid]' target=_new>[resend activation e-mail]</a></p>";
Near the bottom, right before "?>", add:
if ($action=="resend") {
$getuserinfo=$DB_site->query_first("SELECT username,password,email,joindate FROM user WHERE userid=$userid");
$activateid=$getuserinfo[joindate];
$username=$getuserinfo[username];
$password=$getuserinfo[password];
$email=$getuserinfo[email];
$usernameenc=urlencode($getuserinfo[username]);
$temp1=$DB_site->query_first("SELECT template FROM template WHERE title = 'activateemail'");
$tmpl1 = str_replace("\"","\\\"",$temp1[template]);
$temp2=$DB_site->query_first("SELECT template FROM template WHERE title = 'activateemailsubject'");
$tmpl2 = str_replace("\"","\\\"",$temp2[template]);
eval("\$message = \"".$tmpl1."\";");
eval("\$subject = \"".$tmpl2."\";");
mail ("\"$username\" <$email>",$subject,$message,"From: \"$bbtitle User Manager\" <$webmasteremail>");
echo "E-mail resent.";
}
Now find:
if ($displayoptions==1) {
echo "<td><p><a href='user.php?action=edit&userid=$user[userid]'>[edit]</a> <a href='../member.php?action=emailpassword&email=$user[email]' target=_new>[email password]</a> <a href='user.php?action=remove&userid=$user[userid]'>[remove]</a></p></td>";
}
Replace with:
if ($displayoptions==1) {
echo "<td><p><a href='user.php?action=edit&userid=$user[userid]'>[edit]</a> <a href='../member.php?action=emailpassword&email=$user[email]' target=_new>[email password]</a> <a href='user.php?action=resend&userid=$user[userid]' target=_new>[resend activation e-mail]</a> <a href='user.php?action=remove&userid=$user[userid]'>[remove]</a></p></td>";
}
Done!
I'd like to resend the activation mails to my 600 users which are in the "Users Awaiting Email Confirmation" usergroup.
Can something like this be done?
Like implementing this hack to the "Users" -> "E-Mail Users" part of the control panel... I think it will be more useful.
Thanks
YEs this is very useful.
Hopefully this will be included in the v2.0 as I think this has been overlooked for quite sometime.
heh, i've seen a post regarding this, and now a hack is out, thx guyz :)
to let users resend their own activation emails add this @ the bottom of member.php (before ?>)
if ($action=="rat_resend") {
$getuserinfo=$DB_site->query_first("SELECT username,password,email,joindate FROM user WHERE userid=$userid");
$activateid=$getuserinfo[joindate];
$username=$getuserinfo[username];
$password=$getuserinfo[password];
$email=$getuserinfo[email];
$usernameenc=urlencode($getuserinfo[username]);
$temp1=$DB_site->query_first("SELECT template FROM template WHERE title = 'activateemail'");
$tmpl1 = str_replace("\"","\\\"",$temp1[template]);
$temp2=$DB_site->query_first("SELECT template FROM template WHERE title = 'activateemailsubject'");
$tmpl2 = str_replace("\"","\\\"",$temp2[template]);
eval("\$message = \"".$tmpl1."\";");
eval("\$subject = \"".$tmpl2."\";");
mail ("\"$username\" <$email>",$subject,$message,"From: \"$bbtitle User Manager\" <$webmasteremail>");
echo "E-mail resent.";
}
and in your modify profile template add a link to
member.php?action=rat_resend&user=$userid
then in your error user cant post template (i dont recall the exact names here ;)) tell them they can resend their activation email by going to Modify Profile, and clicking the Resend Activation Email link.
now, if you wanted to write something to mail all your un-activated users, you'd do something like get all users in usergroup where usergroup title is Users Awaiting Email Confermation, and while you are going thru select all the info you need and send an email. then on to the next user.
works great but all the users can resend their activation E-mail :D even the registerd ones.
if you wanna be silly about it, you could make a var in the member.php where it does the vars (ie. icq num, etc) and if they are not in the Users Awaiting Moderation group then dont print it.
personally i dont see a need. :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.