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>");
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.
to let users resend their own activation emails add this @ the bottom of member.php (before ?>)
Code:
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
Code:
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.
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.