Skip to content
This plugin is Forked version of sfDotrineApplyPlugin created by punkave guys. This Fork got stripped stripped of all dependencies from Zend Framework, introduced Profile model inheritance, small structural changes and few usability changes as well. Includes following language versions: English, Polish, French and Italian.
Branch: 1.5.x
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


sfForkedDoctrineApply plugin

Originally forked from sfDoctrineApply plugin (version 1.1.1).

It has been stripped of Zend Mail dependency as proposed by stephenrs on symfony forums, here

For news about sfForkedDoctrineApplyPlugin, please visit fizyk's website.


  • symfony 1.4
  • sfDoctrineGuardPlugin 5.x - installed and configured

Requirements should be similar as the original plugin, although I can only be sure of symfony 1.4. When sfDoctrineGuardPlugin will introduce email in official package, our current plugin should be modified to use sfGuardUser's email field, not it's own.

##Changes to sfDoctrineApplyPlugin##

  • removed all Zend Mail dependency
  • created a general library with all sfApplyActions functions
  • introduced inheritance to Profile model.


Installation should be simple as:

symfony plugin:install sfForkedDoctrineApplyPlugin

However it is also possible to install it through archive:

symfony plugin:install sfForkedDoctrineApplyPlugin-1.5.7.tgz

just place downloaded package in your project's root first.

You can also install it manually, unpacking archive, placing it's content in your project's plugin/ directory, and enabling it in your ProjectConfiguration.class.php file:


class ProjectConfiguration extends sfProjectConfiguration
    public function setup()

After that create migrations:

./symfony doctrine:generate-migrations-diff

Review your migration files after this step, and run:

./symfony doctrine:migrate
./symfony doctrine:build --all-classes

All you need to do now is to enable sfApply module in your settings.yml file:


    enabled_modules: [default, ... , sfGuardAuth, sfApply]

Doing this will also automatically add necessary routes to your app

That's pretty much all you have to do. If you're not satisfied with the model provided, you can extend it using e.g column_aggregation inheritance:


    type: column_aggregation
    extends: sfGuardUserProfile

You can add your own columns, relations, behaviours or even model names if needed. With doctrine inheritance you can have different profile types.

You can also add your own columns or redeclare to the provided model instead of using aggregation:


    my_column: { type: int }


sfForkedDoctrineApply 1.5x

If you're planning to upgrade to sfForked 1.5.x from versions olders than 1.4, be sure to migrate to 1.4 before migrating to 1.5.

After migrating to 1.5 migrate databse, since we drop email field, and no longer use profile email field in code.

./symfony doctrine:migrate
./symfony doctrine:build --all-classes
./symfony doctrine:clean-model-files

All calls to profile's email filed by getEmail or setEmail methods will be redirected to user's getEmailAddress or setEmailAddress method.


To configure this plugin to actually send registration emails, You need to set up email settings according to day 16 of Jobeet tutorial.


In order to send emails with confirmation codes you've got to add these settings in your app.yml:


    email: ""
    fullname: "the staff at"
# that section is as a fallback only
    email: ""
    fullname: "the staff at"

You should also turn on i18n engine, as this plugin, like the project it rooted from is fully internationalised (You might have to prepare i18n files for your language though):


    i18n: true

You can modify URL's for the sfApply module's action. To do that, simply add this options to your app.yml file:

          apply: /user/new
          reset: /user/password-reset
          resetRequest: /user/reset-request
          resetCancel: /user/reset-cancel
          validate: /user/confirm/:validate
          settings: /user/settings

Each key's value represents route's url, you can change them as you want.

###sfForkedDoctrineApply:clear-validation-codes task###

Now sfForkedDoctrineApply makes use of the initialy created validate_at field, allowing you to expire validate codes. To remove all codes older than a required time just run:

./symfony sfForkedDoctrineApply:clear-validation-codes -d="number_of_days"

You can ommit the --d parameter, to leave the default value of 1 day.


Starting from 1.1.0 version, sfForkedDoctrineApplyPlugin integrates reCaptcha. To use it, you have to install sfFormExtraPlugin to get access to reCaptcha widget and validator. Second step is to be conducted in your app.yml file, and add these:


    enabled:        true
    public_key:     YOUR_PUBLIC_reCAPTCHA_KEY
    private_key:    YOUR_PRIVATE_reCAPTCHA_KEY

enabled property is for enabling and disabling captcha. After setting this, reCaptcha will appear on apply and reset request pages.

###Custom forms###

It's possible to define custom forms, however all custom forms must extend the Apply ones. To use custom forms, you need to define them in your app.yml file:


    applyForm: sfApplyApplyForm
    resetForm: sfApplyResetForm
    resetRequestForm: sfApplyResetRequestForm
    settingsForm: sfApplySettingsForm

The above example uses standard sfApplyForms.

###Email editing###

To allow users to edit their emails, you've got to add app_sfForkedApply_mail_editable setting:

    mail_editable: false

Now, when user will try to edit their email, he'll receive confirmation email on his old address. editMail action will also get route generated which will be composed from settings URL to which "/email" end will be added.

###Confirmation disabling###

It is possible, although not recommended to disable email confirmations for the following actions:

  • Apply (apply) - new users will be registered and logged as soon as they submit valid apply form.
  • Password reset (reset) - this will disable the reset request, password change will be possible only for logged in users.
  • Email edit (email) - new email will immediately replace old one.
  • Password reset for logged users (reset_logged) - this will send confirmation email for logged users (default is disabled).

To disable confirmation emails for any of this actions, simply add and modify following options to application's app.yml file:

      reset: true
      apply: true
      email: true
      reset_logged: false

###Login redirect###

There are two settings regarding directing user after actions he takes within sfApply module:

    afterLogin: after_login_route
    after: after_route
  # as a fallback we use old options too:
    afterLogin: after_login_route
    after: after_route

You can use these settings to direct user to your own pages after user loggs in, or in other cases with second setting.

Displaying Login and Logout Prompts##

(fragment of sfDoctrineApplyPlugin's README)

You probably have pages on which logging in is optional. It's nice to display a login prompt directly on these pages. If you want to do that, try including my login/logout prompt component from your apps/frontend/templates/layout.php file:

<?php include_component('sfApply', 'login') ?>

Note that you can suppress the login prompt on pages that do include this partial by setting the sf_apply_login slot:

<?php slot('sf_apply_login') ?>
<?php end_slot() ?>


sfDoctrineApplyPlugin was written by Tom Boutell. He can be contacted at See also and for further information about his work.

Changes resulting in forking the original plugin were written by stephenrs.

Both Tom and Stephen deserves a Big thanks.

sfForkedDoctrineApplyPlugin was created by Grzegorz Śliwiński as a result of those changes with some (more and more with each release) additions. You can contact him at or through jabber at the same address and follow his adventures on his homepage.


  • Dutch - Jasper Moelker
  • French - Pierre Grandin
  • German - Daniel Hanke
  • Italian - Alessandro Rossi
  • Polish - Grzegorz Śliwiński
  • Russian - Serg Puhoff
  • Spanish - Alex Otero
  • Portugese (Brazil) - Alan Candido

Support and Help

sfForkedDoctrineApply is completely free, but you can support it's creator:

Support sfForkedDoctrineApplyPlugin

For help regarding this plugin, you can go to plugin's github issue tracker, or contact author via jabber/xmpp/gtalk protocol: or though e-mail:

You can’t perform that action at this time.