Well, I fixed the original problem, but now after setting my logout
function, the redirect will not work. I remember there is some way to
fix this but I cannot seem to remember. The logout function looks like
this.

function logout() {
        $this->Session->delete('User');
        $this->redirect('localhost');
}


On Jun 25, 7:13 pm, John David Anderson <[EMAIL PROTECTED]>
wrote:
> On Jun 25, 2007, at 7:58 PM, inVINCable wrote:
>
>
>
>
>
> > I have spent the last 3 hours trying to figure this out, and to no
> > avail.
>
> > Everything was fine and dandy until I add my login function in the
> > users controller. unction login() {
>
> >            if(!empty($this->data))
>
> >            {
> >                    // see if there are any users in the database with the 
> > same
> > username
> >                    $someone = 
> > $this->User->findByUsername($this->data['User']
> > ['username']);
>
> >             if(!empty($someone['User']['password']) && $someone
> > ['User']
> > ['password'] == $this->data['User']['password'])
> >                    {
> >                            $this->Session->write('User', $someone['User']);
> >                            $this->redirect('/');
> >                    }
> >                    {
>
> >    echo "there has been a problem";
> >                    }
> >            }
> >    }
>
> > It keeps telling me it has already sent the session headers from my
> > other model (school.php) I have had this problem before and could
> > never fix it. What the hell is my other model sender out as a header?
>
> Got any whitespace before or after the <? ?>, or is there *anything*
> be printed or echo()'d?
>
> -- John


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to