Solved

Can I pass Wordpress URL parameters to identify a user?

Posted on 2013-06-06
8
613 Views
Last Modified: 2014-11-12
Hey Experts!!

Site A = Microsoft Azure platform
Site W = Wordpress platform

I have a bit of a dilemma. I have 2 sites, Site A and Site W. Site A is where all of my customer data is stored. Site W is where they will be purchasing products.
I control NOTHING on Site A, but have full control of Site W.  

My question is this:
If Site A can pass me URL variables, can I identify and possibly login users on my Wordpress site(Site W)?  I realize I may have to keep the user data in 2 separate places, but I'll have to tackle this later.  For now I just need to know if and how I can do this.
0
Comment
Question by:LZ1
  • 4
  • 3
8 Comments
 
LVL 9

Expert Comment

by:Ishaan Rawat
Comment Utility
0
 
LVL 30

Author Comment

by:LZ1
Comment Utility
I read the codex, however I don't want to update a user. Unless I misread, it seems I can only update their account.  Rather take them to a product page or at least their account page.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
Comment Utility
Surprisingly, WordPress is pretty weak on SSO and passthrough login solutions. The closest/best plugin to look into at this time is Keyring:

http://wordpress.org/plugins/keyring/

Alternately, you can bypass the wp-users table for an external database:

http://wordpress.org/plugins/external-db-auth-reloaded/

I have implemented something similar to the above plugin (also using the original external-db-auth abandoned plugin as the base) and it works very well.
0
 
LVL 30

Author Comment

by:LZ1
Comment Utility
Thanks Jason, I'll definitely look into those.

Along the same note though, would there be a better way of going about all of this? Obviously besides having the same platform on the same domain for everything.
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 70

Expert Comment

by:Jason C. Levine
Comment Utility
There really isn't.  Your problem is a fundamental one: the data isn't where it needs to be and you don't have enough control to implement a more granular solution.  So a login token or external authentication are your only choices.
0
 
LVL 30

Author Comment

by:LZ1
Comment Utility
So where can I learn more about actually doing it? I've never done anything this "heavy".  Any tutorials or good articles you could recommend?

After that I'll close the question and then ask more specific questions as they come up.
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 500 total points
Comment Utility
This isn't quite as difficult as it sounds.  You need to be able to generate a token on site A that contains the user's information, encrypted, and create a URL that has the encrypted text as the query string.  On site B, you decrypt the information and do something with it that makes life easier for the user.

The headache is that you won't have a matching user account on Site B unless you are doing something else that synchronizes the two databases.  Worse, you probably won't have a plain-text password from the Azure site to import to WordPress.  This is why I think you should look into the external DB plugins and not login tokens...it's easier.

One thing you COULD do with the token method is pass the user information through wp_create_user()  and basically auto-create an account for users the first time they cross over.  If the account already exists, you would redirect them to the login page and autopopulate the username.
0
 
LVL 30

Author Comment

by:LZ1
Comment Utility
Thanks for all the info Jason. I haven't done anything like that yet of course. But I'll be looking into it this week.

Stay tuned, I'm sure this will be a lot of fun. Thanks again.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Monitoring systems evolution, cloud technology benefits and cloud cost calculators business utility.
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now