public function executeForgottenPassword()
 {
 .....
.....
....

return sfView::NONE;
}

On Fri, Jun 11, 2010 at 11:35 AM, ANRI <[email protected]> wrote:

> module user - action executeForgot
>  public function executeForgot()
>  {
>        ... //check email
>        if($email) {
>        ... // generate new password
>        $raw_email = $this->getController()-
> >getPresentationFor('mail', 'forgottenPassword');
>        $this->getUser()->setFlash('message', "Your new password has
> been sent.");
>        $this->redirect('@homepage');
>        }
>        else
>        {
>                $this->getUser()->setFlash('message', "Email address not
> registered");
>                $this->redirect('@register');
>        }    }  }
>
> module mail - action executeForgot
>
> class mailActions extends sfActions
> {
>  public function executeForgottenPassword()
>  {
>    $title='New Password - tReds';
>    $this->new_password = $this->getRequest()-
> >getAttribute('new_password');
>    //sfMailer (swiftMailer)
>    $mailer = $this->getMailer();
>    $message = $mailer->compose();
>    $message->setSubject($title);
>    $message->setTo($this->getRequest()->getAttribute('email'));
>    $message->setFrom(sfConfig::get('app_mail_sender_email'),
> sfConfig::get('app_mail_sender_name'));
>    $message->setBody($this->getPartial('forgottenPassword'), 'text/
> html');
>    $mailer->send($message);
>  }
> } }
>
> module mail - template   _forgottenPassword.php
> <p>This email contains your new password that was requested from
> website.</p>
> <p style="font-family: Arial;">Your new password is: <?php echo
> $new_password ?></p>
> <p style="font-family: Arial;">After you login you can change it from
> your personal settings</p>
>
> When I call module user, action executeForgot - letter send, but
> error:
> The template "forgottenPasswordSuccess.php" does not exist or is
> unreadable in "".
> I create a template "forgottenPasswordSuccess.php" (empty).
> When I call the module user, action executeForgot: letter send,
> redirect empty "forgottenPasswordSuccess.php" and redirect @homepage
> and displays "Your new password has been sent."
> I added in action executeForgot
> $this->setLayout(false);
> $this->setTemplate(false);
> return sfView::NONE;
> but still redirect empty "forgottenPasswordSuccess.php"
>
> How to call the action from another action or disable template
> "forgottenPasswordSuccess.php".
>
> P.S. Sorry for my mistakes. My English is not good enough.
>
> --
> 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 developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<symfony-devs%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/symfony-devs?hl=en
>



-- 
Have a nice day!

Alecs
Certified ScrumMaster

P.S. If you are on a list, please don't contact me privatelly, unless i have
allowed to. Further messages will be ignored.

There are no cannibals alive! I have ate the last one yesterday ...
I am on web:  http://www.alecslupu.ro/
I am on twitter: http://twitter.com/alecslupu
I am on linkedIn: http://www.linkedin.com/in/alecslupu
Tel: (+4)0722 621 280

-- 
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 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