You could also rewrite your action like so:

function edit($id = null){
    if (!empty($this->data)) {
        if ($this->User->save($this->data)) {
                $this->Session->setFlash(
                        'Success.',
                        'message_succes'
                );
        } else {
                $this->Session->setFlash(
                        'Error !',
                        'message_erreur'
                );
                }
        }
}
--~--~---------~--~----~------------~-------~--~----~
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