Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Can I pass Wordpress URL parameters to identify a user?

Posted on 2013-06-06
8
624 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 10

Expert Comment

by:Ishaan Rawat
ID: 39225931
0
 
LVL 30

Author Comment

by:LZ1
ID: 39226739
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
ID: 39227847
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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 30

Author Comment

by:LZ1
ID: 39228786
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
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 39229464
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
ID: 39229886
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
ID: 39232533
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
ID: 39234492
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
In the market for a new backup solution for Windows Server 2016? Follow these guidelines to get the most bang for your buck.
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
The viewer will learn how to count occurrences of each item in an array.

790 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