Hi Gareth,
thanks verymuch.
It helped.
I added below line code in sfGuardBasicSecurityFilter
//signour if guest user and click on login page
if($this->getContext()->getUser()->getGuardUser()->getIsGuest())
{
$this->getContext()->getUser()->signOut();
}
Thanks Again.
On Nov 19, 1:39 pm, Gareth McCumskey <[email protected]> wrote:
> What about doing a pre-filter?
>
> http://www.symfony-project.org/book/1_2/06-Inside-the-Controller-Laye...
>
>
>
> On Thu, Nov 19, 2009 at 6:08 AM, Avani <[email protected]> wrote:
> > Hi friends,
>
> > In my "before login" pages, there are 3 "tabs"
>
> > 1. Register (register page)
> > 2. Login (login page)
> > 3. Guest (visit site as guest)
>
> > Now, here, what I have done is.. when user clicks on "guest" he will
> > be automatically logged in as "guest" user and can access some
> > functionality of the site. So, sfguard sessions will be set.
>
> > Now the problem is.. when user click on "guest" it will be
> > automatically logged in as "guest user". Now, if it clicks on "login",
> > it will be redirected to "profile" as user is already login... ( I
> > want to appear login here only for guest user)
>
> > But I want to put a check.. if guest user.. then click on login page,
> > logout guest user and show login form. (instead of going to profile)
>
> > My problem is .. where to write code for it ? I am not able to find
> > which file is executing and checking that "if already login and click
> > on login page, then send to profile page instead of showing login form
> > "
>
> > Can anybody help me?
>
> > thanks in advance.
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "symfony users" group.
> > To post to this group, send email to [email protected].
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=.
>
> --
> Gareth McCumskeyhttp://garethmccumskey.blogspot.com
> twitter: @garethmcc
--
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=.