Scott MacVicar
09-06-2001, 10:00 PM
This provides an option to email all users who are in the Awaiting Email Confirmation usergroup again with their activation code. I used this on my forums as some people either accidently deleted the email or the mail servers were down.
Open /admin/index.php and after
<a href="user.php?s=<?php echo$session[sessionhash]; ?>&action=referrers"> Referrals </a><br>
around line 246
and add
<a href="user.php?s=<?php echo$session[sessionhash]; ?>&action=emailactive"> Mass Email Activation Code </a><br>
save index.php and open /admin/user.php
look for
if (isset($action)==0) {
$action="modify";
}
around line 44-46
and add
// ###################### Mass Email Activation Code #######################
if ($action=="emailactive") {
$query=$DB_site->query("SELECT userid,username,email,password,joindate FROM user WHERE usergroupid='3'");
while ($user=$DB_site->fetch_array($query)) {
$userid=$user[userid];
$username=$user[username];
$password=$user[password];
$activateid=$user[joindate];
eval("\$message = \"".gettemplate("email_activateaccount",1,0)."\";");
eval("\$subject = \"".gettemplate("emailsubject_activateaccount",1,0)."\";");
echo "Email sent to:<br>";
if(mail ($user[email],$subject,$message,"From: \"$bbtitle Mailer\" <$webmasteremail>")) {
echo "$user[email] <br>";
}
}
}
re-upload /admin/index.php and /admin/user.php to your site.
The options will now be present within the control panel.
Open /admin/index.php and after
<a href="user.php?s=<?php echo$session[sessionhash]; ?>&action=referrers"> Referrals </a><br>
around line 246
and add
<a href="user.php?s=<?php echo$session[sessionhash]; ?>&action=emailactive"> Mass Email Activation Code </a><br>
save index.php and open /admin/user.php
look for
if (isset($action)==0) {
$action="modify";
}
around line 44-46
and add
// ###################### Mass Email Activation Code #######################
if ($action=="emailactive") {
$query=$DB_site->query("SELECT userid,username,email,password,joindate FROM user WHERE usergroupid='3'");
while ($user=$DB_site->fetch_array($query)) {
$userid=$user[userid];
$username=$user[username];
$password=$user[password];
$activateid=$user[joindate];
eval("\$message = \"".gettemplate("email_activateaccount",1,0)."\";");
eval("\$subject = \"".gettemplate("emailsubject_activateaccount",1,0)."\";");
echo "Email sent to:<br>";
if(mail ($user[email],$subject,$message,"From: \"$bbtitle Mailer\" <$webmasteremail>")) {
echo "$user[email] <br>";
}
}
}
re-upload /admin/index.php and /admin/user.php to your site.
The options will now be present within the control panel.