How to insert record into vBulletin

Discussion in 'Integration' started by slinky, Jan 7, 2012.

  1. slinky

    slinky Member

    Joined:
    Jul 15, 2010
    Messages:
    200
    Hi guys - I'm looking at the API, desperately trying to figure out how to insert a usergroupID into a user and can't seem to see where that is happening in the API. I've discovered a bug that causes all users to be registered as a usergroupid 0 in vbulletin. This processs of setting a user group in all the third party software has to be similar for others as vbulletin but I need it for vb 4.

    http://www.amember.com/docs/API/Protect

    I see create amember table and not sure what this does. It's the closest I can see but I don't want to create a table, just an entry and change the value of a field so taht every ID_GROUP equals a value of 2.

    public function createTable() { $table = new Am_Protect_Table($this, $this->getDb(), '?_members', 'ID_MEMBER'); $table->setFieldsMapping(array( array(Am_Protect_Table::FIELD_LOGIN, 'memberName'), array(Am_Protect_Table::FIELD_LOGIN, 'realName'), array(Am_Protect_Table::FIELD_PASS, 'passwd' ), array(Am_Protect_Table::FIELD_SALT, 'passwordSalt'), array(Am_Protect_Table::FIELD_GROUP_ID, 'ID_GROUP'), array(Am_Protect_Table::FIELD_ADDED_STAMP, 'dateRegistered'), array(Am_Protect_Table::FIELD_EMAIL, 'emailAddress'), array(Am_Protect_Table::FIELD_REMOTE_ADDR, 'memberIP'), array(Am_Protect_Table::FIELD_REMOTE_ADDR, 'memberIP2'), )); return $table; }
  2. slinky

    slinky Member

    Joined:
    Jul 15, 2010
    Messages:
    200
    IP Address and other information is not entered into the vBulletin database at all. I can see the item for member IP but it's not being written into vbulletin, only user name and password.
  3. slinky

    slinky Member

    Joined:
    Jul 15, 2010
    Messages:
    200
    No - that's the API - it's not included in the vbulletin plugin and I can't see how it's mapping the usergroupid field properly to vbulletin although I thought it was doing so earlier. As I mentioned to others, a rebuild of my vbulletin database set ALL users to an ID of "0" and rendered nobody able to login at all since that usergroup ID will bump you out and keep you out of logging in.
  4. slinky

    slinky Member

    Joined:
    Jul 15, 2010
    Messages:
    200
    It looks like all the vbulletin settings are in binary format in the database so you can't get into it to see how amember is storing the settings that are saved in the admin cp on the back end.... hmmm....
  5. slinky

    slinky Member

    Joined:
    Jul 15, 2010
    Messages:
    200
    Going to have to remove it unfortunately. Four days is too long.
  6. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    As I remember the problem was in integration settings for plugin. There was no record for vBulletin set at aMember CP -> Protect Content -> Integration
  7. slinky

    slinky Member

    Joined:
    Jul 15, 2010
    Messages:
    200
    Combination of things - yes, this was not set up (you should put this step specifically into the manual.) I didn't understand why I needed to do this as I saw "protect content" but everything I was doing is free. It still must be setup and "protected" but the protection setting is to free. A bit confusing.

    The other issue was the one I reported in the plugin and COPPA being set as on. That one has now been fixed per conversation so the VB 4 plugins looks good.

    I sent in another email regarding some final issues and hopefully we can resolve those. Thanks as always for the support.

Share This Page