ram2600
02-26-2005, 02:29 AM
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);
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);