Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7789089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:11:26+00:00 2026-06-01T21:11:26+00:00

I have a Symfony 1.4 system that is used to dynamically load different site

  • 0

I have a Symfony 1.4 system that is used to dynamically load different site content from a single Symfony Project based on the domain name. This system has a backend and in the backend I have the “Forgot Your Password” functionality working great, with 1 issue. The email it sends from is set in apps/backend/config/app.yml with the setting:

all:
  sf_guard_plugin:
    routes_register: true
    default_from_email: noReply@domain.com

but I have multiple domains not just one.

In my DB I have stored the domain names, my controller has logic to get the current domain name, query the DB and then saves a session attribute of sid (site_id) which is the table id for the given domain.

What I want to do is have the ability to set the default_from_email to the current domain.

i.e. noReply@domain1.com or noReply@domain2.com 

depending on which domain the end user used to access the site.
My question is .. is there a way in the

app.yml file to put a variable %domain% 

and then populate that somewhere related to the forgot password functionality in sfDoctrineGuardPlugin
OR
Is there a way to override the sfDoctrineGuardPlugin sfGuardForgotPassword module to insert the logic to use the current domain as the from email

Currently my solution was to insert logic into the BasesfGuardForgotPasswordActions.class.php, this is NOT THE RIGHT WAY (though it works), but I needed a quick fix.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T21:11:29+00:00Added an answer on June 1, 2026 at 9:11 pm

    Of course, you can override the default handling of sfGuardForgotPassword:

    • create a new module called sfGuardForgotPassword in your apps/modules folder
    • create a new folder called actions
    • create a file actions.class.php with this inside

    actions.class.php

    <?php 
    require_once(sfConfig::get('sf_plugins_dir').'/sfDoctrineGuardPlugin/modules/sfGuardForgotPassword/lib/BasesfGuardForgotPasswordActions.class.php');
    
    /**
     *
     * @package    symfony
     * @subpackage plugin
     * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
     * @version    SVN: $Id: actions.class.php 23319 2009-10-25 12:22:23Z Kris.Wallsmith $
     */
    class sfGuardForgotPasswordActions extends BasesfGuardForgotPasswordActions
    {
      protected function sendRequestMail($user, $forgotPassword)
      {
        // send the mail as you want
      }
    
      protected function sendChangeMail($user, $password)
      {
        // send the mail as you want
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a symfony 1.4 project with the single application frontend . This application
I have a Symfony task that generates some files calls exec to a jar
I have a symfony project with the followin structure SDCU |-app |-----cache |-----logs |-bin
Problem: I have a symfony project with a database full of production data I
We have FireSymfony that allows one to view the Symfony, PHP variables in a
I have an application that I'm converting to Symfony/Doctrine. It currently stores a serialized
In my Symfony 2 project, I have a page displaying information about an entity.
I have a Symfony app that populates the widgets of a portal application and
I have a Symfony 1.2.4 application, taken and modified from the Symfony sandbox application
I have a symfony app that uses the json_encode and json_decode to keep a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.