At cakePHP documentation, it's clear that beforeSave have to return true to
continue the Save process.
But, i was doing some tests..
function beforeSave(){return false;}
function save() {
$this->set("CSS", "main");if (!empty($this->data)) {if
($this->User->save($this->data)) {$this->flash('Your user has been saved.',
'/users');}}
}
my view:
<?php echo $this->element('esquerdoPadrao'); ?>
<div id="tres_colunas_center">
<h1>Add Post</h1>
<?php echo $form->create('User');
echo $form->input('name');
echo $form->input('username');
echo $form->input('password');
echo $form->input('email');
echo $form->end('Salvar Usuario');?>
</div>
and ,saved.
I was at tmp/cache/..
and cleaned. But , it continues..
Why?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---