Kier
04-24-2001, 10:00 PM
This tiny hack is in response to a request from Sharg - I would put it into the 2.0 code, but understandably, John doesn't want to make any further modifications to the code unless they are absolutely necessary.
It allows you to use the admin email function to send an email which will remind users in the 'Users awaiting bla bla bla' group of the link for their activation code.
In admin/email.php, find this code: $users=$DB_site->query("SELECT userid,username,password,email FROM user WHERE $condition AND userid>='$startat' AND userid<'$finishat' AND adminemail=1 ORDER BY userid DESC");
while ($user=$DB_site->fetch_array($users)) {
$userid=$user[userid];
$sendmessage=$message;
$sendmessage=str_replace("\$email",$user[email],$sendmessage);
$sendmessage=str_replace("\$username",$user[username],$sendmessage);
$sendmessage=str_replace("\$password",$user[password],$sendmessage);
mail($user[email],$subject,$sendmessage,"From: $from"); and replace it with this: $users=$DB_site->query("SELECT userid,username,password,email,joindate FROM user WHERE $condition AND userid>='$startat' AND userid<'$finishat' AND adminemail=1 ORDER BY userid DESC");
while ($user=$DB_site->fetch_array($users)) {
$userid=$user[userid];
$sendmessage=$message;
$sendmessage=str_replace("\$email",$user[email],$sendmessage);
$sendmessage=str_replace("\$username",$user[username],$sendmessage);
$sendmessage=str_replace("\$password",$user[password],$sendmessage);
$sendmessage=str_replace("\$userid",$user[userid],$sendmessage);
$sendmessage=str_replace("\$activateid",$user[joindate],$sendmessage);
$sendmessage=str_replace("\$bburl",$bburl,$sendmessage);
mail($user[email],$subject,$sendmessage,"From: $from"); The variables $userid and $activateid are now available for you in the mail message, allowing you to construct the link to the activation page like this:
$bburl/register.php?a=act&u=$userid&i=$activateid
It allows you to use the admin email function to send an email which will remind users in the 'Users awaiting bla bla bla' group of the link for their activation code.
In admin/email.php, find this code: $users=$DB_site->query("SELECT userid,username,password,email FROM user WHERE $condition AND userid>='$startat' AND userid<'$finishat' AND adminemail=1 ORDER BY userid DESC");
while ($user=$DB_site->fetch_array($users)) {
$userid=$user[userid];
$sendmessage=$message;
$sendmessage=str_replace("\$email",$user[email],$sendmessage);
$sendmessage=str_replace("\$username",$user[username],$sendmessage);
$sendmessage=str_replace("\$password",$user[password],$sendmessage);
mail($user[email],$subject,$sendmessage,"From: $from"); and replace it with this: $users=$DB_site->query("SELECT userid,username,password,email,joindate FROM user WHERE $condition AND userid>='$startat' AND userid<'$finishat' AND adminemail=1 ORDER BY userid DESC");
while ($user=$DB_site->fetch_array($users)) {
$userid=$user[userid];
$sendmessage=$message;
$sendmessage=str_replace("\$email",$user[email],$sendmessage);
$sendmessage=str_replace("\$username",$user[username],$sendmessage);
$sendmessage=str_replace("\$password",$user[password],$sendmessage);
$sendmessage=str_replace("\$userid",$user[userid],$sendmessage);
$sendmessage=str_replace("\$activateid",$user[joindate],$sendmessage);
$sendmessage=str_replace("\$bburl",$bburl,$sendmessage);
mail($user[email],$subject,$sendmessage,"From: $from"); The variables $userid and $activateid are now available for you in the mail message, allowing you to construct the link to the activation page like this:
$bburl/register.php?a=act&u=$userid&i=$activateid