vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   running script after confirmed (https://vborg.vbsupport.ru/showthread.php?t=79456)

diesel08 04-06-2005 08:01 AM

running script after confirmed
 
in register.php underneath..

Quote:

if ($userinfo['coppauser'] OR ($vboptions['moderatenewmembers'] AND !$userinfo['posts']))
{
// put user in moderated group
eval(print_standard_error('error_moderateuser'));
}
else
{

i inserted...

Quote:

// activate account
$username = unhtmlspecialchars($userinfo['username']);

$DB_site->query("INSERT INTO USERS(UserID, Username, Password) VALUES('".$bbuserinfo['userid']."','".$bbuserinfo['username']."','green')");

and underneath that is the normal code...

Quote:

if ($vboptions['welcomemail'] AND !$userinfo['posts'])
{
eval(fetch_email_phrases('welcomemail'));
vbmail($userinfo['email'], $subject, $message);
}


e.t.c....

Now... as you can tell my statement inserts data to table using sql query..

but the part .$bbuserinfo['username']. seems to be not getting the username every time..


8 out of 10 instances so far it has saved the username 'Unregistered'


to fix this should i put my code in another part of the script, or use a different variable instead of $bbuserinfo['username']


Basically trying to run my code once the user has confirmed registration.. and needs their uid and uname to work.


help appreciated.

sabret00the 04-06-2005 09:23 AM

what is the script using around that point?

try using an addslashed $_POST['username']

diesel08 04-07-2005 01:14 AM

i dont understand your question?

when a person confirms their activation, i want that username to be inserted into my sql code that is pasted above.. in some cases it isnt posting the Username that has been confirmed.. and is doing 'Unregistered'

Im puzzled about why it is doing this, and wondered if there is another way to reference the username that is being confirmed.. or if i should place the code somewhere else.


All times are GMT. The time now is 02:20 AM.

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.01054 seconds
  • Memory Usage 1,717KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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