FOSUserBundle Configuration Reference

2.0 version
Maintained

FOSUserBundle Configuration Reference

All available configuration options are listed below with their default values.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
fos_user:
    db_driver:              ~ # Required
    firewall_name:          ~ # Required
    user_class:             ~ # Required
    use_listener:           true
    use_flash_notifications: true
    use_authentication_listener: true
    use_username_form_type: true
    model_manager_name:     null  # change it to the name of your entity/document manager if you don't want to use the default one.
    from_email:
        address:        webmaster@example.com
        sender_name:    webmaster
    profile:
        form:
            type:               FOS\UserBundle\Form\Type\ProfileFormType # or 'fos_user_profile' on Symfony < 2.8
            name:               fos_user_profile_form
            validation_groups:  [Profile, Default]
    change_password:
        form:
            type:               FOS\UserBundle\Form\Type\ChangePasswordFormType # or 'fos_user_change_password' on Symfony < 2.8
            name:               fos_user_change_password_form
            validation_groups:  [ChangePassword, Default]
    registration:
        confirmation:
            from_email: # Use this node only if you don't want the global email address for the confirmation email
                address:        ...
                sender_name:    ...
            enabled:    false # change to true for required email confirmation
            template:   '@FOSUser/Registration/email.txt.twig'
        form:
            type:               FOS\UserBundle\Form\Type\RegistrationFormType # or 'fos_user_registration' on Symfony < 2.8
            name:               fos_user_registration_form
            validation_groups:  [Registration, Default]
    resetting:
        retry_ttl: 7200 # Value in seconds, logic will use as hours
        token_ttl: 86400
        email:
            from_email: # Use this node only if you don't want the global email address for the resetting email
                address:        ...
                sender_name:    ...
            template:   '@FOSUser/Resetting/email.txt.twig'
        form:
            type:               FOS\UserBundle\Form\Type\ResettingFormType # or 'fos_user_resetting' on Symfony < 2.8
            name:               fos_user_resetting_form
            validation_groups:  [ResetPassword, Default]
    service:
        mailer:                 fos_user.mailer.default
        email_canonicalizer:    fos_user.util.canonicalizer.default
        username_canonicalizer: fos_user.util.canonicalizer.default
        token_generator:        fos_user.util.token_generator.default
        user_manager:           fos_user.user_manager.default
    group:
        group_class:    ~ # Required when using groups
        group_manager:  fos_user.group_manager.default
        form:
            type:               FOS\UserBundle\Form\Type\GroupFormType # or 'fos_user_group' on Symfony < 2.8
            name:               fos_user_group_form
            validation_groups:  [Registration, Default]

This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.