How to get currently registered user data zend framework

I want to get information about the user who registered on my website as part of zend.

+5
source share
2 answers

You can get the data stored in Zend_Auth as follows:

$identity = Zend_Auth::getInstance()->getIdentity();

The variable $identityshould now contain any data that you saved in Zend_Auth when the user logged in.

+13
source

this is part of a function returning userme details

    $auth = Zend_Auth::getInstance();
    if($auth->hasIdentity())
    {

        $user = $auth->getIdentity();
        $username = $this->view->escape(ucfirst($user->username));
}

for more information you can use $user->otherDetailName, if, and save them when a user logs on to the site!

+2
source

All Articles