I have a question about my app.i have 2 models User,Profile with the
regular actions (add,view...etc).When user logs in I enable some
buttons for view,edit,create profile.I want when a User creates a
profile to disable the create button to prevent from creating a new
one or just print a message to tell him that profile exists.
I do something like this inside add function but it doesn't work:
if( $this->Auth->user('id') == $this->data['Profile']['user_id'] ){
//print a warning message
} else {
//proceed to creation
}
Can any1 help me how i can check whether the profile's data are filled
with values and prevent User?
Many Thanks in advance
Paulos
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment