> One other way to do it is when the user logs in, store his username as a > session variable: > > $this->getUser()->setAttribute('username', $username); > > Then when the user is redirected to the action that produces the login > page when his session times out, check to see if that session variable > exists and if so, then his session has timed out: > > if ($this->getUser()->hasAttribute('username')) > { > $session_timed_out = true; > } > else > { > $session_timed_out = false; > }
Thanks. I had kind of figured that myself, but find that it is a very ugly solution, and naturally assumed that there must be a cleaner way of doing it. It could potentially be done in a filter, but that just adds extra overhead on every request, so wasn't too enamored with that solution either. I had actually expected there to be a simple config option somewhere that would handle the case, and be able to simply indicate the page to which I wanted to redirect in the case of a session expiration. But that doesn't seem to be the case, and I couldn't find any docs indicating anything along those lines. Anyone else have any ideas? Thanks, Eric -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en