Just keep logged user's data (like login name and so on) in session
variable. Then you can use it everywhere.

For example, from my code of app_controller.php:


function beforeFilter() {
        $this->loggeduser=$this->Session->read('Userdata');
}

function beforeRender() {
        $this->set("userdata",$this->loggeduser);
}

And voila! We have $userdata variable in EVERY view. And $this-
>loggeduser variable in every controller.


On 22 фев, 21:54, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I want the users of my application to be able to change only certain
> aspects of their profile. Limiting the fields in the save method
> prevents users from modifying fields like registration date or
> username. My problem is: If there are validation errors these "read-
> only" properties of the model disappear.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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