You have coded $this->redirect($this->Auth->redirect()); that's why it's
redirecting
On Monday, 13 August 2012 05:10:45 UTC+5:30, Toren Valone wrote:
>
> I know this is probably a simple answer, but i appear to be stumped, I
> have a user controller, which authorizes a user and then checks to see if
> they user has an owner record. Unfortuanltly my code just flies over the
> code and hits the redirect in the appcontroller. Here is the
> UserController.php code.
>
> public function login() {
> if($this->request->is('post')) {
> if($this->Auth->login()) {
> //User is authorized so see if they have an owner
> //record
> $results = $this->User->findById($this->Auth->user('id'));
> $this->set('results',$results);
>
> }
> $this->redirect($this->Auth->redirect());
> } else {
> $this->Session->setFlash(_('Invalid name or password,try
> again'));
> }
> }
>
> here is the view in Users/is_owner.ctp
>
> <? echo debug($results); ?>
> <? echo debug($results['User']); ?>
>
>
>
--
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].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.