The auth session never resets itself unless you log back in. I created
this method below:


        /**
         * Refreshes the Auth to get new data
         * @param string $field
         * @param string $value
         * @return void
         */
        function _refreshAuth($field = '', $value = '') {
                if (!empty($field) && !empty($value)) {
                        $this->Session->write($this->Auth->sessionKey .'.'. 
$field,
$value);
                } else {
                        if (isset($this->User)) {
                                $this->Auth->login($this->User->read(false, 
$this->Auth->user
('id')));
                        } else {
                                
$this->Auth->login(ClassRegistry::init('User')->findById($this-
>Auth->user('id')));
                        }
                }
        }

Place that in your app_controller and call it like so: $this-
>_refreshAuth('email', '[email protected]');
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to