I'm new to Cake -- so forgive my ignorance. I have a simple User object I created. I have a component that I share across controllers to do various features, check if a username is valid, add a user, provide a password hashing method, etc. (think of it as a service layer.)
The register controller that I created uses the login component to perform the tasks it needs to do.. It uses some simple ajax to provide information on if the username is valid, a password strength, etc. Any who -- when I submit the index view back to the register controller, I do the following: 1) Check to make sure username is valid. 2) Hash the password posted back to me using the hashing component. 3) $this->controller->User->create(); 4) $this->controller->User->set($this->controller->data); 5) $this->controller->User->save(); 6) The controller that's using this component then calls the login method (again, in the component.) 6) redirect to the home controller (main page.) It all appears to go okay.. I see that new records are added to the database, etc., all at this time. However, the login function is not working. This leads me to believe that the User model is cached, is not updated, or something other than what I'm expecting is not happening. Is there a way to force the User model to update after I call User- >save()? Everything works individually (i.e., my login controller successfully uses the login component to login a user, creates session information, etc., ) it just doesn't work when orchestrated in the fashion I described. I know I could just authenticate the user manually with the information that I used to call the create user method of the component, but now I'm curious and want to know what's going on.. hah Anyone have any suggestions? Again, forgive my ignorance of the framework as I'm brand new to it.. Thanks, Ian --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
