Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-26-2005, 02:29 AM
ram2600 ram2600 is offline
 
Join Date: Jan 2005
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Custom Registration / User Duplication

Hi,

Here is a quick overview of how we ae using vB. Our main site is <SITE>.com, this is where we have a wealth of user data, to avoid the users from recreating this data in Vb We disabled the registration sectio of vB. I them create a script that is run when a new user activates his gamertag account, and this place the user in the Needed vB Tables (well that we beleive) I will put the php inserts at the bottom.

I am adding info the following tables; user, usertext, and usertextfield. This allowed for the user to apper correctly in the admincp.

The users are able to log in fine, but I have seen duplicate users being created in the usertable, I have been investigatiing my scripts but they run only once on activation for that user and never again.

today I cleand up all the dupes so the database was consistant, but all new users and users that have not logged in in a while, those with I am guessing the lastactiviy date of 1969, seem to duplicate them selvesafter logging into vB. (stilll a guess on that db field or the reason)

I am trying to determin if during logon to vB have I missed some data on the inserts and the login code creates a new user. The record is usually the same, excpet for the date fields and the salt value, we use a constant salt for all users, and that is not present on the dupes.

Any thoughts or help would be appreciated.

Thank you
-Ralph

------php inserts----
user table
$forumFields = "usergroupid, username, password, salt, passworddate, joindate, lastvisit, lastactivity, email, homepage, options, importuserid ";
$forumValues = " 2, '$gamertag', '$password','$gtsalt' ,UNIX_TIMESTAMP(now()), UNIX_TIMESTAMP(now()), UNIX_TIMESTAMP(now()), UNIX_TIMESTAMP(now()), '$email', '$url', 6167, $id ";
$forumUserSQL = sprintf("INSERT INTO user (%s) VALUES (%s);", $forumFields, $forumValues);

---------------------
userfields and usertext field.

$forumGetID = sprintf("Select userid from user where username = '%s';", $gamertag);
if (mysql_query($forumUserSQL, $remoteForums)) {
$rsID = mysql_query($forumGetID, $remoteForums);
$vbIDForActivation = mysql_fetch_assoc($rsID);
if ($blnTesting) echo "[ActivateForumUser]: We Have Connection - proceed<br>";

//insert into userfield
$forumUserfield = sprintf("INSERT INTO userfield (userid) VALUES (%s);", $vbIDForActivation['userid']) ;
//insert into usertextrield
$forumUsertextfield = sprintf("INSERT INTO usertextfield (userid) VALUES (%s);", $vbIDForActivation['userid']) ;

mysql_query($forumUserfield, $remoteForums);
mysql_query($forumUsertextfield, $remoteForums);
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:52 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.03883 seconds
  • Memory Usage 2,186KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_threadedmode.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete