Hi, not sure, but it looks like for me if the password ($this->Auth- >password('demo')) is already encoded, and when it checks then encode it again.
Is that true? Thanks, Janos On Thu, Sep 15, 2011 at 12:11 PM, byqsri <marco.rizze...@gmail.com> wrote: > Hi > I have my CAKEPHP application ... I have create a demo user and an > action in users controller called "demo" to allow access like demo > user: > > function demo { > $this->Auth->logout(); > $this->data[$this->Auth->fields['username']] = 'demo'; > $this->data[$this->Auth->fields['password']] = $this->Auth- >>password('demo'); > if (!($this->Auth->login($data))) { > $this->redirect($this->Auth->loginAction); > } else { > $this->Session->delete('Auth.redirect'); > //print_r($this->Session->read('Auth.User.username'));die(); > $this->Auth->loginRedirect = array('admin' => > false,'controller' => > 'demo', 'action' => 'index'); > } > } > > Now in a page of another site I have add a link that redirect to / > users/demo of my cake application. > > But If I click on this link I don't login in cakephp application and I > redirect to login page instead that on /demo/index > > But If i uncomment the line print_r($this->Session- >>read('Auth.User.username'));die(); and the I reclick on link I can > see that it show the correct username "demo". > > Can someone help me about this problem? > > Many Thanks > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP Questions site http://ask.cakephp.org and help > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/cake-php > -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php