|
|||
|
Hello,
I have a login Controller that uses an Zend Auth to authentcate the user. I have a UserClass that is called in the bootstrap file that I need to look for the Zend Auth Session. If I print the session I can see the data after I am authenticated in the UserClass but I do not want to call it using. PHP Code:
I might be little simple here but I can not see a way to access that session using Zend_Session without doing PHP Code:
Please help ![]() |
|
|||
|
try this:
PHP Code:
![]() |
|
|||
|
Hello,
It is always the way that writing your problem down helps solve it. If you do the following PHP Code:
All you then need to do is create a new Zend_Session object with the namespace of Zend_Auth. I used the code below to extract the userid of the authenticated login PHP Code:
Madmaxious |
|
|||
|
I used:
$auth->setStorage(new Zend_Auth_Storage_Session('admin')); $result = $auth->authenticate($adapter); ... Than later after success authenticate: $data = $adapter->getResultRowObject(null, 'password'); $auth->getStorage()->write($data); Can I use following to access the saved data? $auth = new Zend_Session_Namespace('admin'); hello, $auth->admin_firstname admin_firstname is a column in the admin table. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|