Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Add new Users (automatically)
Andreas's Avatar
Andreas
Join Date: Jan 2004
Posts: 6,863

 

Germany
Show Printable Version Email this Page Subscription
Andreas Andreas is offline 06-09-2005, 10:00 PM

As this is a common request for integration purposes, I thought I should write up another HowTo

If you want to add a new user to the vBulletin database, you can use Class vB_Datamanager_User.
This Calss does make sure that everything is OK, it will also take care of the default registration options.

Example
PHP Code:
$newuser =& datamanager_init('User'$vbulletinERRTYPE_ARRAY);
$newuser->set('username''phpNukeUser');
$newuser->set('email''foo@bar.com');
$newuser->set('password''verysecret');
$newuser->set('usergroupid'2); 
If there are errors (eMail not set, eMail banned, Username taken, etc.) you can check for errors using
PHP Code:
$newuser->errors 
This is an array containing the errors.

If everything is OK
PHP Code:
$newuserid $newuser->save(); 
This will create a new User called phpNukeNuser (UserID returned in $newuserid).

You can also set many other info too:
  • membergroupids = comma-separated string of all additional usergroups (Default=Empty)
  • displaygroupid = ID of the usergroup this user should show up as (Default=0)
    Note that this must be set after usergroupid and membergroupids!
  • styleid = ID of the Style to be used by this user (Default=Board Default)
  • languageid = ID of the language to be used by this user (Default=Board Default)
  • threadedmode = Whether to use Flat (0), Hybrid (1) or Threaded (2) Display Mode
  • maxposts = Integer, how many posts should be shown on one Page (Default=Board Default)
  • ipaddress = String, IP-Adress of the User registering (Default=Empty)
  • refererid = String, Username or UserID of the User this user was refered by
  • parentemail = String. eMail-Address of the users Parents
  • daysprune = Integer, show threads from the last X days
  • startofweek = Integer, When does the week start (1=Sunday, 2=;onday, ...) (Default=Board Default)
  • timezoneoffset = Integer, spexifying the Timezone (-12 .. +12)
  • autosubscribe = Integer, defining default mode for Thread subscription
    -1 = no Subscription, 1 = Instant, 2 = Daily Digest, 3 = Weekly Digest
    (Default=Board Default)
  • homepage = String, URL of the users Homepage (Default=Empty)
  • icq = String, the Users ICQ # (Default=Empty)
  • aim = String, the Users AIM ID (Default=Empty)
  • yahoo = String, the Users Yahoo ID (Default=Empty)
  • MSN = String, the Users MSN ID (Default=Empty)
  • usertitle = String, the Usertitle this user should have
  • customtitle = Integer, defining behaviour of Usertitle. 0=No Custom Title, 1=Custom, Title with HTML, 2=Custom Title without HTML (Default=
  • birthday = array(month, day, year). The users birthdate.
  • avatarid = Integer, ID of the Avatar being used for this user
  • signature = String. The Users Signature
  • subfolders = Array. The Users Subscription Folders
  • pmfolders = Array. The Users Subscription Folders
  • buddylist = String. Space separated List of UserIDs defining the Users buddylist
  • ignorelist = String. Space separated List of UserIDs defining the Users ignorelist

Besides that, you can also set the options Bitfield (Receive Admin PMs, etc.)
PHP Code:
$userdata->set_bitfield('options''optionname''value'); 
The available Options are
  • showsignatures = Show Signatures
  • showavatars = Show Avatars
  • showimages = Show Images, incl. attached Images and [img] BBCode
    If this is not set they will show up as links
  • coppauser = User is COPPA User
  • adminemail = Receive Admin eMails
  • showvcard = Allow vCard Download
  • dstauto = Automatically detect DST setting
  • dstonoff = DST turned On
  • showemail = Receive eMails from other Users
  • invisible = Be invisible
  • showreputation = Show Reputation
  • receivepm = PM turned on
  • emailonpm = eMail notification for new PMs

Value must be 0 or 1 (false or true), depending if you want to set the option or not.
If the Options are not set, the Default Registration Options/Board Default Options will be used.

Important Notice
It is assumed that you are using this code from 'within' vBulletin, eg with the vBulletin backend loaded.
If this is not the case, you must include smth. like the following code in global context:
PHP Code:
define('VB_AREA''External');
define('SKIP_SESSIONCREATE'1);
define('SKIP_USERINFO'1);
define('CWD''/path/to/vbulletin');
require_once(
CWD '/includes/init.php'); 
Keep in mind that if you are using the a/m Datamanager-Code within a function or method you must global $vbulletin.

This How-To is (C) 2005 by KirbyDE and you are not allowed to redistribute it in any way without my explicit consent.
Reply With Quote
  #62  
Old 07-31-2007, 04:28 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Add the following to the top of your script:

PHP Code:
error_reporting(E_ALL & ~E_NOTICE); 
Reply With Quote
  #63  
Old 07-31-2007, 04:57 PM
RonInMaine RonInMaine is offline
 
Join Date: Jul 2007
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you. That worked nicely.

But, now you've got me curious. How did changing the error reporting options fix the problem?

Thanks,
Ron.
Reply With Quote
  #64  
Old 08-09-2007, 05:02 AM
psalzmann psalzmann is offline
 
Join Date: Mar 2004
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Brilliant! Thanks Novastar!
Reply With Quote
  #65  
Old 08-12-2007, 06:40 AM
blogtorank's Avatar
blogtorank blogtorank is offline
 
Join Date: Jan 2006
Posts: 450
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've made it possible for you all to start creating members automatically here in this new hack:

https://vborg.vbsupport.ru/showthread.php?t=154637

I branched differently with all full sources of .NET and PHP using what I seen on the forums here with my .NET, and putting it all to work within XML_RPC I hope this helps others out as well.
Reply With Quote
  #66  
Old 08-15-2007, 02:52 AM
psalzmann psalzmann is offline
 
Join Date: Mar 2004
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

We are using novastar's hack as mentioned above and it's working fine. However, adding users is one thing, updating is another .. which brings me to my next question:

Will this work to actually "update" an existing user, all we're trying to do is update an existing user in the forum to a new usergroup:

PHP Code:
$userdm new vB_DataManager_User($vbulletinERRTYPE_ARRAY);

$userdm->set('username'$_POST['username']);
$userdm->set('usergroupid'"9");
$userdm->set('displaygroupid'"9");

$forumuserid $userdm->save(); 
But before I execute and implement that code above, I just want to make sure this won't actually "insert/register or create" a user, I would like to just update.

Any clues? is there a $userdm->update(); instead of save? I noticed a pre_save() option and now it's got me a bit curious

Thanks in advance!

Okay I did some more reading.. would someone be able to verify the following code:

PHP Code:
$forumuserid 10;

$userdm new vB_DataManager_User($vbulletinERRTYPE_ARRAY);

$existing = array(
    
'userid' => $forumuserid,
    
'usergroupid' => 9,
    
'usertitle' => 'Licensed Member',
    
'customtitle' => 1
);

$userdm->set_existing(&$existing);

$userdm->save(); 
TIA
Reply With Quote
  #67  
Old 08-15-2007, 03:22 AM
blogtorank's Avatar
blogtorank blogtorank is offline
 
Join Date: Jan 2006
Posts: 450
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
We are using novastar's hack as mentioned above and it's working fine. However, adding users is one thing, updating is another .. which brings me to my next question:

Not off hand I don't think there is anything that can make it update without modifying the code to make it UPDATE, unless you make the set work as an update within a sql statement inside your PHP code....
Reply With Quote
  #68  
Old 09-06-2007, 02:06 AM
taras taras is offline
 
Join Date: Nov 2003
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey novastar
How do you pass varibles from another DB?
we tryed:
PHP Code:
session_start();
//connections whith DataBase
$str=file("config.php");
$k str_replace("hostName="""$str[0]); $k rtrim($k);
$o str_replace("userName="""$str[1]); $o rtrim($o);
$d str_replace("password="""$str[2]); $d rtrim($d);
$db str_replace("datebase="""$str[3]); $db rtrim($db);
$DB mysql_connect($k,$o,$d);
mysql_select_db($db,$DB);

$id =$_GET['id'];
$active =$_GET['active'];

$checkA =  mysql_query("select active,userName,email,userPass from tusers where userID = ".$id$DB);
$checkA mysql_result($checkA,0,'active');

if(
$checkA == $active)
{
    
$checkA =  mysql_query("UPDATE tusers SET active = '' where userID = ".$id$DB);
    
session_register('userIDD');
    
$_SESSION['userIDD'] = $id;
    
setcookie("userIDD"$id);
    
$username=mysql_result($checkA,0,'userName');
    
$email=mysql_result($checkA,0,'email');
    
$password=mysql_result($checkA,0,'userPass');
    
virtual("file_with_your_code.php");
    
$redirect "<META HTTP-EQUIV='Refresh' CONTENT='0; URL=somefile.php'>\n";
}
else
{
$redirect "";} 
But it's not working...



Quote:
Originally Posted by novastar View Post
i use a modified version of the code they gave a couple posts back which works great for me.
Code:
<?php
$username="username";
$email="email@address.com";
$password="password";
$usergroupid="2";
$timezoneoffset="-6";
define('THIS_SCRIPT', 'remote_register.php');
chdir('/home/site/public_html/forum'); 
require_once('./global.php');
require_once('./includes/class_dm.php');
require_once('./includes/class_dm_user.php');
$userdm = new vB_DataManager_User($vbulletin, ERRTYPE_ARRAY);

$userdm->set('username', $username);
$userdm->set('email', $email);
$userdm->set('password', $password);
$userdm->set('usergroupid',$usergroupid);
$userdm->set('ipaddress', $ipaddress);
$userdm->set('timezoneoffset', $timezoneoffset);
$userdm->set_bitfield('options', 'adminemail', '1');
$userdm->set_bitfield('options', 'showemail', '1');

#If there are errors (eMail not set, eMail banned, Username taken, etc.) you can check for errors using
if (count($userdm->errors)) {
for($i=0; $i<count($userdm->errors); $i++) {
print "ERROR{$i}:{$userdm->errors[$i]}\n";
}
} else {
# If everything is OK
$newuserid = $userdm->save();
print "vbuserid:$newuserid\n";
}
chdir('/home/site/public_html/'); 
?>
I would have taken more time to tinker with it, and possibilly put it in a function, but as there is only 1 place in my scripting but that works fine for me.
Im running it on vBulletin 3.6.2
Reply With Quote
  #69  
Old 10-08-2007, 02:33 PM
skattabrain skattabrain is offline
 
Join Date: Apr 2007
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

novastar ... added user without trouble, thanks!

any ideas on how to add the custom field data?
Reply With Quote
  #70  
Old 10-13-2007, 04:16 AM
amatulic amatulic is offline
 
Join Date: Sep 2007
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

After much testing and examining vBulletin code, I finally finished my PHP class for performing basic operations on user accounts (create user, modify user, delete user, log on, log off). This has enabled me to integrate the forum into my site. Users who log in to my site are logged in to the forum, users who register on my site automatically get an account on the forum, etc.

Once that was done, I just had to modify all the vBulletin templates that contained a login form, logout link, register link, or user account modification link, and make sure those things use MY code for those functions. Now users can log in either from the forum or from my main site, and user account registration and modification are all handled on my main site, outside of the forum. It all works pretty well, without modifying a single line of the vBulletin source code.

Here is the code for class.forumops.php, with extensive usage comments:
PHP Code:
<?php
//==============================================================
// class ForumOps - intended to be used with vBulletin 3.7.2
// by Alex Matulich, June 2008, Unicorn Research Corporation
//
// Setup:
// ------
//
// 1. First, make sure FORUMPATH is defined properly below.
//
// 2. Next, make sure the function userdata_convert correctly converts
// an array of your own user data to an array of vBulletin user data.
// Minimally, you need to convert your data to an array containing
// the keys 'username', 'password', and 'email'.  If your data array
// already contains these keys, simply have userdata_convert return
// the original array, otherwise translate your array to a vBulletin
// array having those keys.
//
// Usage:
// ------
//
// At the top of your php modules where you need to perform vBulletin
// user operations (creation, deletion, updating, login, and logout),
// put these two lines (where MY_PATH is the path to this file):
//
//     require_once(MY_PATH.'/class.forumops.php');
//     $forum = new ForumOps();
//
// Now get your user data array from $_POST or whatever.  Let's call
// this array $userdata.  Here's what you can do:
//
// CREATE AND REGISTER NEW USER:
//
//    $errmsg = $forum->register_newuser($userdata);
//
// UPDATE EXISTING USER DATA:
//
//    $errmsg = $forum->update_user($userdata);
//
// (In this case, $userdata need contain only the username and anything
// else you wish to update, such as password and/or email address.)
//
// $errmsg contains any error messages separated by <br> codes.
// If no errors occured then NULL is returned.
//
// DELETE USER:
//
//    $forum->delete_user($username); // $username = user name
//
// LOGIN USER TO THE FORUM:
//
//    $forum->login(  // requires array to be passed
//       array('username' => $username, 'password' => $pw);
//
// LOG OFF USER FROM THE FORUM:
//
//    $forum->logout();
//
// WARNING: It is common for you to have TABLE_PREFIX defined for
// your own database.  You must call it something else (for example,
// remove the underscore) or it will conflict with the vBulletin
// definition of the same name.
//===============================================================

//===============================================================
// Change this definition and the userdata_convert() function
// to suit your needs:

define('FORUMPATH''/home/my_website_path/forum'); // path to your forum

function userdata_convert(&$userdata// internal function
{
   
// $userdata is our array that contains user data from our own
   // user database, which we must convert to the vBulletin values.
   // Minimally, it must contain the username, email and/or password.

   // required fields
   
$vbuser = array( 'username' => $userdata['userid'] );
   if (isset(
$userdata['email']))
      
$vbuser['email'] = $userdata['email'];
   if (isset(
$userdata['password']))
      
$vbuser['password'] = $userdata['password'];

   
// extra stuff, expand as desired
   
if ($userdata['birthdate'])
      
$vbuser['birthday_search'] = date('Y-m-d'$userdata['birthdate']);
   return 
$vbuser;
}
// end of configuration stuff
//===============================================================

define('REGISTERED_USERGROUP'2); // typical default for registered users
define('PERMANENT_COOKIE'false); // false=session cookies (recommended)

define('THIS_SCRIPT'__FILE__);
$cwd getcwd();
chdir(FORUMPATH);
require_once(
'./includes/init.php'); // includes class_core.php
require_once('./includes/class_dm.php'); // for class_dm_user.php
require_once('./includes/class_dm_user.php'); // for user functions
require_once('./includes/functions.php'); // vbsetcookie etc.
require_once('./includes/functions_login.php'); // process login/logout


//---------------------------------------------------------------------
// This function duplicates the functionality of fetch_userinfo(),
// using the user name instead of numeric ID as the argument.
// See comments in includes/functions.php for documentation.
//---------------------------------------------------------------------
function fetch_userinfo_from_username(&$username$option=0$languageid=0)
{
   global 
$vbulletin;
   
$useridq $vbulletin->db->query_first_slave("SELECT userid FROM "
      
TABLE_PREFIX "user WHERE username='{$username}'");
   if (!
$useridq) return $useridq;
   
$userid $useridq['userid'];
   return 
fetch_userinfo($userid$option$languageid);
}


//---------------------------------------------------------------------
// CLASS ForumOps
//---------------------------------------------------------------------
class ForumOps extends vB_DataManager_User {
   var 
$userdm;

   function 
ForumOps() // constructor
   
{
      global 
$vbulletin;
      
$this->userdm =& datamanager_init('User'$vbulletinERRTYPE_ARRAY);
   }


   
//======== USER REGISTRATION / UPDATE / DELETE ========

   
function register_newuser(&$userdata$login true)
   {
      global 
$vbulletin;
      
$vbuser userdata_convert($userdata);
      foreach(
$vbuser as $key => $value)
         
$this->userdm->set($key$value);
      
$this->userdm->set('usergroupid'REGISTERED_USERGROUP);

      
// Bitfields; set to desired defaults.
      // Comment out those you have set as defaults
      // in the vBuleltin admin control panel
      
$this->userdm->set_bitfield('options''adminemail'1);
      
$this->userdm->set_bitfield('options''showsignatures'1);
      
$this->userdm->set_bitfield('options''showavatars'1);
      
$this->userdm->set_bitfield('options''showimages'1);
      
$this->userdm->set_bitfield('options''showemail'0);

      if (
$login$this->login($vbuser);

      
//$this->userdm->errors contains error messages
      
if (empty($this->userdm->errors))
         
$vbulletin->userinfo['userid'] = $this->userdm->save();
      else
         return 
implode('<br>'$this->userdm->errors);
      return 
NULL;
   }


   function 
update_user(&$userdata)
   {
      global 
$vbulletin;
      
$vbuser userdata_convert($userdata);
      if (!(
$existing_user fetch_userinfo_from_username($vbuser['username'])))
         return 
'fetch_userinfo_from_username() failed.';

      
$this->userdm->set_existing($existing_user);
      foreach(
$vbuser as $key => $value)
         
$this->userdm->set($key$value);

      
// reset password cookie in case password changed
      
if (isset($vbuser['password']))
         
vbsetcookie('password',
            
md5($vbulletin->userinfo['password'].COOKIE_SALT),
            
PERMANENT_COOKIEtruetrue);

      if (
count($this->userdm->errors))
         return 
implode('<br>'$this->userdm->errors);
      
$vbulletin->userinfo['userid'] = $this->userdm->save();
      return 
NULL;
   }


   function 
delete_user(&$username)
   {
   
// The vBulletin documentation suggests using userdm->delete()
   // to delete a user, but upon examining the code, this doesn't
   // delete everything associated with the user.  The following
   // is adapted from admincp/user.php instead.
   // NOTE: THIS MAY REQUIRE MAINTENANCE WITH NEW VBULLETIN UPDATES.

      
global $vbulletin;
      
$db = &$vbulletin->db;
      
$userdata $db->query_first_slave("SELECT userid FROM "
         
TABLE_PREFIX "user WHERE username='{$username}'");
      
$userid $userdata['userid'];
      if (
$userid) {

      
// from admincp/user.php 'do prune users (step 1)'

         // delete subscribed forums
         
$db->query_write("DELETE FROM " TABLE_PREFIX
            
"subscribeforum WHERE userid={$userid}");
         
// delete subscribed threads
         
$db->query_write("DELETE FROM " TABLE_PREFIX
            
"subscribethread WHERE userid={$userid}");
         
// delete events
         
$db->query_write("DELETE FROM " TABLE_PREFIX
            
"event WHERE userid={$userid}");
         
// delete event reminders
         
$db->query_write("DELETE FROM " TABLE_PREFIX
            
"subscribeevent WHERE userid={$userid}");
         
// delete custom avatars
         
$db->query_write("DELETE FROM " TABLE_PREFIX
            
"customavatar WHERE userid={$userid}");
         
$customavatars $db->query_read("SELECT userid, avatarrevision FROM "
          
TABLE_PREFIX "user WHERE userid={$userid}");
         while (
$customavatar $db->fetch_array($customavatars)) {
            @
unlink($vbulletin->options['avatarpath'] . "/avatar{$customavatar['userid']}_{$customavatar['avatarrevision']}.gif");
         }
         
// delete custom profile pics
         
$db->query_write("DELETE FROM " TABLE_PREFIX
            
"customprofilepic WHERE userid={$userid}");
         
$customprofilepics $db->query_read(
            
"SELECT userid, profilepicrevision FROM "
            
TABLE_PREFIX "user WHERE userid={$userid}");
         while (
$customprofilepic $db->fetch_array($customprofilepics)) {
            @
unlink($vbulletin->options['profilepicpath'] . "/profilepic$customprofilepic[userid]_$customprofilepic[profilepicrevision].gif");
         }
         
// delete user forum access
         
$db->query_write("DELETE FROM " TABLE_PREFIX
            
"access WHERE userid={$userid}");
         
// delete moderator
         
$db->query_write("DELETE FROM " TABLE_PREFIX
            
"moderator WHERE userid={$userid}");
         
// delete private messages
         
$db->query_write("DELETE FROM " TABLE_PREFIX
            
"pm WHERE userid={$userid}");
         
$db->query_write("DELETE FROM " TABLE_PREFIX
            
"pmreceipt WHERE userid={$userid}");
         
$db->query_write("DELETE FROM " TABLE_PREFIX
            
"session WHERE userid={$userid}");
         
// delete user group join requests
         
$db->query_write("DELETE FROM " TABLE_PREFIX
            
"usergrouprequest WHERE userid={$userid}");
         
// delete bans
         
$db->query_write("DELETE FROM " TABLE_PREFIX
            
"userban WHERE userid={$userid}");
         
// delete user notes
         
$db->query_write("DELETE FROM " TABLE_PREFIX
            
"usernote WHERE userid={$userid}");

      
// from admincp/users.php 'do prune users (step 2)'

         // update deleted user's posts with userid=0
         
$db->query_write("UPDATE " TABLE_PREFIX
            
"thread SET postuserid = 0, postusername = '"
            
$db->escape_string($username)
            . 
"' WHERE postuserid = $userid");
         
$db->query_write("UPDATE " TABLE_PREFIX
            
"post SET userid = 0, username = '"
            
$db->escape_string($username)
            . 
"' WHERE userid = $userid");

         
// finally, delete the user
         
$db->query_write("DELETE FROM " TABLE_PREFIX
            
"usertextfield WHERE userid={$userid}");
         
$db->query_write("DELETE FROM " TABLE_PREFIX
            
"userfield WHERE userid={$userid}");
         
$db->query_write("DELETE FROM " TABLE_PREFIX
            
"user WHERE userid={$userid}");
      }
   
/*
      the following is suggested in the documentation but doesn't work:

      $existing_user = fetch_userinfo_from_username($username);
      $this->userdm->set_existing($existing_user);
      return $this->userdm->delete();
   */
   
}


   
// ======== USER LOGIN / LOGOUT ========

   
function login($vbuser)
   {
      global 
$vbulletin;
      
$vbulletin->userinfo fetch_userinfo_from_username($vbuser['username']);

      
// update password expire time to
      // to prevent vBulletin from expiring the password
      
$this->userdm->set_existing($vbulletin->userinfo);
      
$this->userdm->set('passworddate''FROM_UNIXTIME('.TIMENOW.')'false);
      
$this->userdm->save();

      
// set cookies
      
vbsetcookie('userid'$vbulletin->userinfo['userid'],
         
PERMANENT_COOKIEtruetrue);
      
vbsetcookie('password',
         
md5($vbulletin->userinfo['password'].COOKIE_SALT),
         
PERMANENT_COOKIEtruetrue);

      
// create session stuff
      
process_new_login(''1'');
   }


   function 
logout()
   {
      
process_logout(); // unsets all cookies and session data
   
}

// end class ForumOps
chdir($cwd);
?>
As you can see, most of the operations above are pretty simple, except for the user deletion function. Also, to update user account information, see the first post of this thread for options you can use.

The wordwrapping above looks funny, but if you quote this message as if to reply, the wordwrapping will be correct when you copy and paste it.

I hope this helps some people.
-Alex
Reply With Quote
  #71  
Old 10-14-2007, 07:47 PM
Lordy Lordy is offline
 
Join Date: Oct 2002
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When using your code (amatulic), I get
Quote:
Fatal error: Call to a member function query_first() on a non-object in /home/lordy/domains/animefill.com/public_html/project/forum/includes/class_dm_user.php on line 380
I'm passing the variables this way

PHP Code:
    $userdata['userid']=$_POST['uname'];
       
$userdata['password']=$_POST['password'];
           
$userdata['email']=$_POST['email'];
       
$errmsg=$forum->register_newuser($userdata); 
line 380 is
PHP Code:
        else if (htmlspecialchars_uni($username_raw) != $this->existing['username'] AND $user $this->dbobject->query_first(
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 08:23 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05626 seconds
  • Memory Usage 2,481KB
  • Queries Executed 25 (?)
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)bbcode_code
  • (12)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (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_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
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete