Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8600163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:33:21+00:00 2026-06-12T01:33:21+00:00

Fairly new to Zend Framework 1.11 with Doctrine 2. I have successfully created a

  • 0

Fairly new to Zend Framework 1.11 with Doctrine 2.

I have successfully created a login etc using Doctrine.

My current problem though is that the Zend_Auth instance works fine when I stay within the controller that the log in is within.

If I try determine the state of Zend_Auth::getInstance->HasIdentity() in any other controller it returns blank.

If I then go back to any page residing within the controller containing the login/authentication hasIdentity works fine.

I have even tried writing to the storage but this provides no joy.

My auth code is as follows which is the action called after clicking Login (Within MembersareaController)

public function authAction()
{
    $this->_helper->viewRenderer->setNoRender(true);

    $loginForm = new Application_Model_Login();

    if($this->getRequest()->isPost()){
        $usr = "";
        $pwd = "";
        $KeepLoggedIn = false;
        $message = "";

        $usr = $this->_getParam('username'); 
        $pwd = $this->_getParam('password');
        $pwdMd5 = md5($pwd);

        if($usr !== "" && $pwd !== ""){

            $GDSAdaptor = new ZC_Auth_Adapter($usr, $pwdMd5);

            $result = \Zend_Auth::getInstance()->authenticate($GDSAdaptor);

            if(\Zend_Auth::getInstance()->hasIdentity()){
                $this->flashMessenger->addMessage(LOGIN_SUCCESS);
                $this->_redirect('/membersarea/index');
            }else{
                $this->flashMessenger->addMessage(LOGIN_INVALID);
            }
        }else{
            $this->flashMessenger->addMessage(LOGIN_MISSING_FORMVAL);
            $this->_redirect('/membersarea/login');
        }
    }

Trying to seeing a person is logged in on the IndexController with the following code produces no results. hasIdentity returns a blank value.

public function indexAction()
{

    if(Zend_Auth::getInstance()->hasIdentity())
    {
        $msg = "hasIdentity: YES";
    }else{
        $msg = "hasIdentity: NO";
    }

    $this->view->msg = $msg;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:33:23+00:00Added an answer on June 12, 2026 at 1:33 am

    Zend_Session::rememberMe(); in the bootstrap solved this issue

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Fairly new to wpf, using the galasoft mvvm templates. I have two relaycommands that
I am fairly new to php and mysql but I have created a small
I'm fairly new to C++ standard library and have been using standard library lists
I'm fairly new to Zend Framework and MVC in general so I'm looking for
Hi I am fairly new to Zend framework. I am working with a tutorial
fairly new Android developer here. I've come across a strange problem that I'm not
I'm fairly new to the Zend Framework and MVC and I'm a bit confused
My goal is to require login for certain pages. I am using Zend Framework
I fairly new to JQuery and perhaps trying to achieve something that might be
I am new to fairly new to AS3 and I have found myself needing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.