:::: MENU ::::

PHP – Import DigitalAccessPass existing users into vbulletin 5 connect for auto-login

I work for many customers who has business model of online sales of digital products like ebooks, video tutorials, premium articles and forums discussion are using DAP for defining user access levels for their wordpress articles.


Vbulletin Connect is 5th version of vbulletin has huge code changes than vbulletin < 5. So, if you want to make external plugins using its old functions it might not always work. To integrate DigitalAccessPass with vb5, login to your DAP account and find [LATEST] DAP v4.5.2 link.

Now let’s do basic integration with vbulletin5 with DAP as explained here. They all works fine except this one.

It won’t work for vbulletin5.

Try this to make it work.

  1. Open your DigitalAccessPass config file (dap-config.php)
  2. Run http://www.yoursite.com/dap/getpath.php as stated in above documentation.
    let’s say it’s 
  3. Append following line

After that, You are ready for forum integration. Follow instructions from this video and sync session between vbulletin and DigitalAccessPass by defining your DigitalAccessPass products to vbulletin forums access level.  So, from now whenever new user make purchase from DAP and creates account, vbulletin also makes his account.

But what about user already made purchases and want to auto-login into vbulletin as soon as they login into your wordpress’s DigitalAccessPass?

Probably, you would consider vbulletin impex import plugin to import users from DAP. Yes, it’s one of the option. But it won’t work if your user didn’t chosen username in your DAP account as it needs only email/password combination for login while vbulletin explicitly need username to map with DAP account.

So, We’ll code a script using DAP plugin API that auto-import userdata from DAP and creates login for them in vbulletin5.

Create php script within /dap directory (lets say dap2vb.php) and all records from dap users table with simple php code.

Let’s make automatic username by concatenating their firstname with lastname  for DigitalAccessPass for users didn’t choose login yet.

Include following php files from DAP plugin direcrory in this script.

Now we fetched all DAP users into array, next step is to use DAP plugin api to auto-create login ito vb forum. Iterate through all users and call registerUser method.

Finally Run this php script and your all DigitalAccessPass logins will be imported into vbulletin.

So, what do you think ?