Posted By

dimitris on 04/19/12


auth identity ZF zendframework

Versions (?)

Refreshing Zend Framework Auth Identity

 / Published in: PHP

A very simple example of how you can refresh the data into an Identity instance generated by Zend Auth

  1. $this->auth = Zend_Auth::getInstance();
  2. // Creating user object using the email stored in session
  3. $user = new Master_Model_User( $this->auth->getIdentity()->email );
  4. $user->status = 1;
  5. $user->Save(); // Saves user data
  6. $this->auth->getStorage()->write($user);

Report this snippet  

You need to login to post a comment.