0

I have a Web App that resides in example.com (non-WordPress, completely independent databases, etc) and I have a WordPress website, website.example.com and example.com/website.

Users will never log into WordPress, but they will access the WordPress website, then log into the Web App.

The Web App stores sessions and on the Web App pages I display this to show that the user is logged in:

echo “<a href='#' class='dropdown-toggle' data-toggle='dropdown'>
    Welcome, ".$_SESSION['full_name']." !</a>”;

How can I show this in WordPress if they change pages to the WordPress website?

1 Answer 1

0

Use javascript, loading from your app - example.com and save the relevant info in cookie. Then on the WordPress, again using javascript, loading from your app (this is important to be able to read cookie) to read value of that cookie and update the page accordingly.

2
  • Hi Ashfame, Do you have any code suggestions/examples? Thanks
    – Infost
    Mar 10, 2015 at 18:17
  • Not really. But that's how something like that is done.
    – Ashfame
    Mar 10, 2015 at 18:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.