vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Registration - using another ID (https://vborg.vbsupport.ru/showthread.php?t=48753)

Chamber 02-10-2003 08:07 AM

Registration - using another ID
 
I'd like to remove the vBulletin registration altogether, and replace it with a bespoke system.

However, I'd still like to use the vB generated cookie, and other board functionality.

The process I envisage is thus:

Bespoke registration page filled in.
Most data saved in new custom table.
Insert ID (for cross referencing) and essential data passed to vB database - > standard registration confirmation email sent.

What I'd really like to know is:

a: What is the "essential" info that vB needs. I'm thinking username, password and email address - anything else?

b: Since I'm handling the registration through a direct connection with the database, how might I envoke the email confirmation bit?

c: Any obvious flaws in the plan?

Many tia.

Xenon 02-10-2003 12:44 PM

a. well you always have to create a userfield row for each user, or you can't edit the user from your acp.

also usergroupid should be specified (2 for registred)
that should be all what is really needed..

Chamber 02-10-2003 01:17 PM

Quote:

Originally posted by Xenon
also usergroupid should be specified (2 for registred)
that should be all what is really needed..

And herein lies the problem.
I'd still like to authenticate email addresses ala vB. Should I try and get the vB engine to do this (if so, how?), or should I write a new bit to the script that updates that field by sending a unique link?

I suspect I'd like it to default to "awaiting vailidation", then somehow send the confirmation and update link.

Cheers, had forgotten about usergroup.

Xenon 02-10-2003 02:35 PM

usergroupid is 3 when you want to validate em :)

then you have to rewrite this code a bit:

PHP Code:

  if ($verifyemail) {
        
// make random number
        
mt_srand ((double) microtime() * 1000000);
    
$activateid=mt_rand(0,100000000);

    
//save to DB
        
$DB_site->query("INSERT INTO useractivation VALUES (NULL,'$userid','".time()."','$activateid',0)");

    eval(
"\$message = \"".gettemplate("email_activateaccount",1,0)."\";");
    eval(
"\$subject = \"".gettemplate("emailsubject_activateaccount",1,0)."\";");

    
mail ($email,$subject,$message,"From: \"$bbtitle Mailer\" <$webmasteremail>");

  } 

(from register.php)

Chamber 02-10-2003 02:40 PM

Yay - thanks muchly, I'll work on that and let ya know how it goes :)

Chamber 02-19-2003 07:44 AM

I've used the above code as a guide and written a new script for this. Still testing at the moment but all seems to be ok. Thanks very much for your help :)


All times are GMT. The time now is 02:42 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.00973 seconds
  • Memory Usage 1,729KB
  • 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
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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