Zend Framework installed. WordPress being installed in sub-folder. How do I carry over Zend user authentication to WP pages?

I am working on a website with the Zend framework installed. Zend controls the user authentication (logged in, logged out, who they are, etc.).

I want to install WordPress into a sub-folder and access the proper user data (username, logged in/out status, etc.) when viewing the pages/posts created by WordPress.

Read More

What steps would I need to take to do this?

NOTE: The programmer before me installed and used Zend, I am familiar with Zend, but not so much the details so you might need to explain in more laymen terms. I’ve used WordPress lots of times and know it quite well.

Related posts

Leave a Reply

1 comment

  1. Somewhere in WordPress (you likely know where since you are familiar with WordPress), you will use the following Zend Framework code:

    $auth = Zend_Auth::getInstance();
    if ($auth->hasIdentity()) {
      // Identity exists; get it
      $identity = $auth->getIdentity();
    }
    

    The above code is checking the session namespace and determining if an identity has been stored. If there is an identity stored, someone has authenticated and you can retrieve that authorized identity.

    The above code assumes that you can load classes with the Zend_ namespace prefix from wordpress (autoload, include_path, etc.).