On Fri, Apr 4, 2008 at 7:43 PM, dw <[EMAIL PROTECTED]> wrote: > > thanks for the replies. i've been picking through auth.php for some > glimmer of what might be going on, but no dice. the thing which > baffles me is that it works for one method but not the other. here is > some code (i included the model, controller, and the two views): > > http://bin.cakephp.org/view/1092010887 >
I noticed a couple of things. 1) you are missing the isAuthorized() method in your controllers. You need it if you've set $this->Auth->authorize to 'controller' 2) You don't need $this->Auth->fields = array('username' => 'username', 'password' => 'password'); in your beforeFIlter() because those are the default values Now, I've never implemented any sort of "change password" functionality, as I always assign people passwords when they forget their old one. However, I did do an action to add people via admin 57 function admin_add() { 58 if (!empty($this->data)) { 59 $this->User->create(); 60 if ($this->User->save($this->data)) { 61 $this->Session->setFlash(__('The User has been saved', true)); 62 $this->redirect(array('action'=>'index')); 63 } else { 64 $this->Session->setFlash(__('The User could not be saved. Please, try again.', true)); 65 } 66 } 67 } I don't have a regular add action. Hope that helps. -- Chris Hartjes Internet Loudmouth Motto for 2008: "Moving from herding elephants to handling snakes..." @TheKeyBoard: http://www.littlehart.net/atthekeyboard --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---