25

WordPress User Sync

NOTE: This content is for advanced users only, who understand the concept of user tables, database, etc. If you don’t understand any of this, then just ignore this – you don’t really need to know this in order to use DAP. This is only an explanation for those who wish to go under the hood of DAP and its integration with WordPress.

As you probably already know, WordPress has its own user database.

DAP has its own User database, and doesn’t use the WordPress database – for many reasons, not limited to the following…

1) Ability to store more user information than what WordPress allows

2) More powerful user search, profile updates, affiliate information, etc.

So, if you want to use any WordPress based plugins – like WordPress Forums or Subscribe2Blog – these forums are looking at WordPress’ native user database.

Now comes the necessity of “syncing” the DAP user data and your WordPress user data.

In the DAP Dashboard, in “Setup > Config > Advanced“, you will see two settings for syncing DAP & WP user data.

(1) Sync DAP User data and WP User data

If you turn this to “Y” (for “Yes”), then every time someone logs into DAP, their DAP user data (just name and email) is automatically “synced” with WordPress user data. If you set this to “N”, then no data will be transferred from DAP to WordPress.

(2) Sync WP data only for PAID users

This one matters only if you have set (1) above to “Y”.

If you want only your “PAID” members to be synced with WordPress, then set this to “Y“.

If you want both “FREE” and “PAID” members synced with WordPress, then set this to “N“.

Here’s how it actually works:

  1. For the sync to work, you must first setup and save the above 2 config settings
  2. After you save the above two config settings, make sure you log out of DAP and re-log in (if you are/were logged in and testing as a regular user), because only then, the Config settings above will take effect.
  3. Your user must log in through a DAP login form (not the WP login form).
  4. Make sure the user is redirected to any part of your WordPress blog after log in. This can be done via “Logged In URL” setting in DAP Config.
  5. The user can be redirected to any WP page, WP post or even your blog home page – that’s the only time the ‘syncing’ kicks in.
  6. When user lands on any page/post of your WP blog, then the DAP LiveLinks plugin (which you have already installed & enabled) kicks of the “sync”, copies the logged in member’s name and email over to the WordPress user table, and also automatically logs him into your WordPress blog.

That’s all there is to it.

Also see: Forum Integration

Click Here to Leave a Comment Below 25 comments
Jeff Kurzner - May 5, 2010

what happens if the user updates their name or email in WordPress from the WP Profile instead of DAP profile?

Reply
Ravi Jayagopal - May 6, 2010

In the current version, the WP changes will get overwritten by DAP the next time they log in or update their profile. DAP is the main “master” database.

Reply
Lex - August 3, 2010

Hi Ravi,

Is there a way to add user profile photos to the DAP profile so that users can have a photo in their profile? It would be ideal to have this synch with the Simple:Press or other WP forum plugins.

Reply
Veena Prashanth - August 10, 2010

Lex,
No, cannot add user profile photos to DAP profile currently but it’s on our to-do list.

Reply
Candace - December 6, 2010

Hi, I've installed DAP and so far it's working fine. I am also using Mingle Forums, and have Synched DAP as instructed, and it works…when you login with the DAP login, you are also logged into the forum, but you are not added as a "new user" to the forum automatically. This means that even though you are logged in, you can't access the posts in the forum. Is there a way to overcome this? I would like new users to be added when they log in for the first time, without me having to add them manually. Is this possible?

Reply
Veena Prashanth - December 7, 2010

Candace,

If you are logged into the forum when you login to DAP, then that indicates that the user sync to wordpress is working fine.

So I am not following your comment about DAP not creating new users. If the user is not created in WP, then DAP cannot log you into the forum. Anyway… we have made some more improvements to the forum / wordpress syncing rules with DAP 4.0. So I suggest that you wait a couple weeks and install dap 4.0 and see if your syncing issues are resolved with that.

Reply
Dan Linstedt - March 9, 2011

Hi Ravi,

I like the integration, BUT – is there an API callback function in DAP that I can execute when a login in WP is made? I have my own custom login form that I want to use, and I’d like to call “DAP” to setup the cookie/verify the user and so on.

Please let me know,
Dan L

Reply
Veena Prashanth - March 9, 2011

Dan,

You can redirect to http://Yoursite.com/dap/authenticate.php

Example below:

header(“Location: /dap/authenticate.php?email=” . $post[’email’] . “&password=” . $post[‘password’] . “&submitted=Y”);

Reply
Troubleshooting DAP/WordPress Sync — DAP Documentation - March 18, 2011

[…] Check if you’ve enabled DAP/WP sync in the first […]

Reply
Starters Guide — DAP Documentation - April 5, 2011

[…] rid of wordpress login. Make DAP login the only entry point.  If you set up DAP->WP sync correctly, then DAP will automatically sync users to WP and upon login to DAP, the users will be […]

Reply
Juan - September 28, 2011

If the user is created by dap, then the ID will be the same in wordpress no matter what changes are done to the user in DAP and/or in wordpress? (knowing that wordpress user get rewritten everytime it syncs with DAP)

thanks.

Reply
Veena Prashanth - September 28, 2011

>>If the user is created by dap, then the ID will be the same in wordpress no matter what changes are done to the user in DAP and/or in wordpress? < < Yes, if dap -> wp sync is enabled, then dap will figure out how to sync dynamically i.e. when to create a new account and when to update existing account.

Reply
Al - February 1, 2012

The problem I have when using the dap –> wordpress feature is that wp users automatically see the wordpress toolbar at the top of the screen when they login. From this wp toolbar, they can access their wp profile and change their wp password there.
However as dap is the master and wp the slave, this password change will not be effective. It’s going to be difficult to explain to my users that they have a profile here but they can’t change the password because they have to do it on another profile (the dap one).

Any idea on how to solve this ?

Reply
Ravi Jayagopal - February 3, 2012

It’s unfortunately an annoying WP feature. There are a few different ways to get rid of it.

Pls see https://www.google.com/search?q=wordpress+remove+admin+toolbar

Reply
Russell - February 4, 2012

I know DAP syncs with wordpress, but does wordpress sync with DAP?

In other words, if I add a user into DAP that is already in WP will it sync to that user in WP? How would I go about achieving this?

Thanks =)

Reply
Veena Prashanth - February 5, 2012

>>I know DAP syncs with wordpress, but does wordpress sync with DAP? < < The syncing is from DAP->WP. Its not from WP -> DAP.

If the user that you add to dap, is already in wp with the same username/email (as in dap), then dap will re-sync to WP when the user logs in to dap.

Reply
Shay - February 20, 2012

I’m using DAP and simple press. I’m having a problem with => Username – Displayname – Loginname

The members created in DAP have a Display name of FirstnameLastname when they go to the forum. Some users have wanted a different display name so they change it using simplepress which then causes login problems. What I mean by that is the user can login to the membership site but when they go to the forum it shows them as a Guest.

How should the username – display name be changed in this arrangement?

Does the DAP username have any bearing on the WP Displayname?

What is causing the users to show up as Guests in the forum?

Thank you!

Reply
Shay - February 21, 2012

I found the solution to my sync problem from DAP to Simple Press. I turned off the ability for users to change their username in Simple Press to prevent more accounts getting out of sync.

I then went to DAP and pulled up the user record. I changed the First name last name combination to create the desired username.

For example, if the user wants his username to be Joe Blow, then you can either enter JoeBlow in the first name or Joe as first name and Blow as Last name.

Here’s the trick to this though, the UserName in DAP, just below the first and last name MUST = whatever the original FirstLastName combination was.

So if the user was originally set up as follows:
First Name – Chris
Last Name – Smith
Username – “empty field”

And he wanted his login name within simple press to be JoeBlow, then you have to change him in DAP like this:
First name: Joe
Last name: Blow
Username: ChrisSmith

or
First name: JoeBlow
Last name: “empty field”
Username: ChrisSmith

This is the only way I have been able to get the account resynchronized. If not done like this then when the user logs into a DAP login form and then goes to Simple Press he will show up as Guest.

Again, this is only if the username got changed in Simple Press. As long as the username is never changed in the first place you won’t have this problem. My experience so far has been that some people don’t want their complete name visible in the forum.

Reply
Shay - February 21, 2012

One question for Veena or Ravi.

Will the solution I presented above cause a problem with Paypal recurring payments? If I understand the recurring payments correctly the key is the email address. Is that right?

Reply
Veena Prashanth - February 21, 2012

Shay,
It wont cause any problems with paypal recurring payment. The key is email address. As long as email address does not change, no issues.

Reply
Phil - March 27, 2012

Hi Ravi,

I’m helping a friend setup his DAP install. We’ve hit a wall with DAP -> WP user syncing though.

As far as I can tell I have the settings correct for syncing. I created a user in DAP and gave it admin rights. However, when I login as that user, no matter what I do, I just can’t get it to sync with WordPress. Is it maybe the fact that it’s an admin user?

Hope you can help!

Reply
Veena Prashanth - April 16, 2012

Pls see this on troubleshooting DAP->WP sync issues.

http://www.digitalaccesspass.com/doc/troubleshooting-dapwordpress-sync/

Reply
Alexei - January 9, 2013

Hi, Unfortunately, as you warned us, the Vbulletin requires a lot of work and the same close attention of hackers. That’s why I decided to switch to a simple WP Forum plugin Simple:press.
Please tell me, if I (before importing data from vBulletin) will delete free members from vbulletin will they be removed automatically from the DAP database?
I would not want to import free users because they are basically the spammer accounts and besides that, I have decided to make a forum available only to paid members.
And also probably I have to ask you whether there is any need to import the members from the vBulletin forum to a fresh install of Simple:press?
Will DAP members automatically become the members of a local forum?

Reply
Veena Prashanth - January 9, 2013

Hi Alexie,

>>Please tell me, if I (before importing data from vBulletin) will delete free members from vbulletin will they be removed automatically from the DAP database? < < No, deleting from VB will not delete users from dap. >> And also probably I have to ask you whether there is any need to import the members from the vBulletin forum to a fresh install of Simple:press? < < If you have dap->wp sync enabled, and if these users are in WP (user table), then no need to import users to Simple:Press.

>> Will DAP members automatically become the members of a local forum? < < Yes they will become members of WP forums like simplepress, bbpress etc, but only if you have DAP->WP sync enabled.

Reply
Andre - January 31, 2013

FYI, the latest WP-Admin bar disable plugin is
http://wordpress.org/extend/plugins/wp-toolbar-removal/

Reply

Leave a Reply: