vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   [RELEASE] Resend activation e-mail (https://vborg.vbsupport.ru/showthread.php?t=6324)

01-04-2001 01:50 AM

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.

01-04-2001 01:54 AM

Argh, it's showing up as HTML...

Quote:

***********************
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!

01-04-2001 03:52 AM

works great, tx.

01-05-2001 10:30 AM

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

01-09-2001 03:50 PM

nice hack :)

01-09-2001 05:04 PM

YEs this is very useful.

Hopefully this will be included in the v2.0 as I think this has been overlooked for quite sometime.

01-15-2001 04:55 AM

heh, i've seen a post regarding this, and now a hack is out, thx guyz :)

01-15-2001 01:37 PM

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.

01-15-2001 07:27 PM

works great but all the users can resend their activation E-mail :D even the registerd ones.

01-15-2001 07:37 PM

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. :)


All times are GMT. The time now is 10:39 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01467 seconds
  • Memory Usage 1,735KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete