Announcement

Collapse
No announcement yet.

Adding users via sql.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Adding users via sql.

    I run a couple of vb forums, but where iIwork we are looking for a new forum. I would therefore prefer to use vb for this purpose as I am familiar with it but i need to do something i have never done before.

    We have a group of users on our site, and we have the means to manage them all from here.
    As we get a lot of people signing up to the site, i need to be able to automatically add them as users to the forum.

    We are using mysql and mssql fed from .net and .asp all of which i am quite comfortable with.

    My question is this, can i add a user to the mysql db of vbulletin directly using my own code. If so which tables would i have to add them to, and what is the minimum info i would need (username,password,email would be ideal)

    I have searched for a couple of hours but can't find any answers.
    Thanks in advance for your help.

  • #2
    You should easily be able to code something that adds users in vBulletin.
    Username / Password / email should be enough, you'd just set default options for everything else.

    If you know php, look through the functions, there's a function to add users as far as I know.
    Best Regards
    Colin Frei

    Please don't contact me per PM.

    Comment


    • #3
      Not used php for years to be honest, but it's an option.

      You mean there exists a function within the vb software code ?

      Comment


      • #4
        Yes, as far as I know.

        Are you running vBulletin 3.0.x or 3.5.0?
        Best Regards
        Colin Frei

        Please don't contact me per PM.

        Comment


        • #5
          3.0.7

          Is what i'm on.

          Comment


          • #6
            I'll have to get back to you later on, as I only have the 3.5.0 files available at the moment.
            Best Regards
            Colin Frei

            Please don't contact me per PM.

            Comment


            • #7
              I just checked, and it seems I was mistaken.

              While all the code you'll need to add a user yourself can be more or less copied from the register.php file, there is no function that does it all for you.

              Sorry...
              Best Regards
              Colin Frei

              Please don't contact me per PM.

              Comment


              • #8
                Thank you for trying.

                So can anyone tell me which tables i need to update (compulsory) as a minimum for adding a user ?

                Thanks.

                Comment


                • #9
                  user, userfield, usertextfield

                  Take a table prefix into account if you're using one.
                  Best Regards
                  Colin Frei

                  Please don't contact me per PM.

                  Comment


                  • #10
                    I have the same problem

                    So I am adding a new user to mySQL directly. I inserted into the user table with : insert into user (username,email,password) Values ('1aaDumbo','[email protected]','foobar');
                    and then used the assigned userid to make entries in the userfield:
                    insert into userfield (userid)values(1795)
                    and usertextfield:
                    insert into usertextfield (userid)values(1795)
                    tables. This user does not appear in the list of site users however. Are there other required fields?

                    Comment


                    • #11
                      correction

                      the user is there after all.. so this seems to work

                      Comment

                      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                      Working...
                      X