Ok, ignore this message, i found a solution using Action Security
feature.
Next time i try to read before post
Embarassed


On 29 mai, 17:13, Milooz <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'd like to have one preExecute() function somewhere who check if the
> user is in index action, if not and if he isn't authentified then
> redirect him on authentification page.
> I use one file per action and the preExecute() of actions.class.php
> don't work, i must copy my preExecute() function in each file.
>
> Here is my function :
>
> public function preExecute()
> {
>   if (($this->getRequestParameter('module') == 'home') &&
>       ($this->getRequestParameter('action') != 'index'))
>     if (!($this->getUser()->hasAttribute('email') &&
>          
> is_object(UserPeer::retrieveByEmail($this->getUser()->getAttribute('email', 
> '[EMAIL PROTECTED]')))))
>
>       $this->redirect('home/subscribe');
>
> }
>
> I repeat simply what i want :
> User not authentified can see index action, when he click on link for
> another action he will be redirected to authentification action.
>
> How can i do that simply ?
>
> Thanks's in advance.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony developers" 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/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to