Refreshing Zend Framework Auth Identity


/ Published in: PHP
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.