-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
1,354 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
FormBuilderBundle\Model\DoubleOptInSession: | ||
type: entity | ||
table: formbuilder_double_opt_in_session | ||
indexes: | ||
token_form: | ||
columns: [ token, form_definition, applied ] | ||
id: | ||
token: | ||
unique: true | ||
column: token | ||
type: uuid | ||
generator: | ||
strategy: CUSTOM | ||
customIdGenerator: | ||
class: Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator | ||
fields: | ||
email: | ||
column: email | ||
type: string | ||
nullable: false | ||
length: 190 | ||
additionalData: | ||
column: additional_data | ||
type: array | ||
nullable: true | ||
dispatchLocation: | ||
column: dispatch_location | ||
type: text | ||
nullable: true | ||
applied: | ||
column: applied | ||
type: boolean | ||
options: | ||
default: 0 | ||
creationDate: | ||
column: creationDate | ||
type: datetime | ||
nullable: false | ||
manyToOne: | ||
formDefinition: | ||
targetEntity: FormBuilderBundle\Model\FormDefinition | ||
orphanRemoval: true | ||
joinColumn: | ||
name: form_definition | ||
referencedColumnName: id | ||
onDelete: CASCADE | ||
uniqueConstraints: | ||
email_form_definition: | ||
columns: [email, form_definition, applied] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
services: | ||
|
||
_defaults: | ||
autowire: true | ||
autoconfigure: true | ||
public: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Double-Opt-In | ||
![image](https://github.com/user-attachments/assets/aa4f1f24-607c-4ed3-aa72-2d9d91fddf12) | ||
|
||
When enabled, a user must confirm its email identity via confirmation before the real form shows up. | ||
|
||
This feature is disabled by default. | ||
|
||
```yaml | ||
form_builder: | ||
|
||
double_opt_in: | ||
|
||
# enable the feature | ||
enabled: true | ||
|
||
# redeem_mode: | ||
# choose between "delete" or "devalue" | ||
# - "delete" (default): The double-opt-in session token gets deleted, after the form submission was successful | ||
# - "devalue": The double-opt-in session token only gets redeemed but not deleted, after the form submission was successful. | ||
redeem_mode: 'delete' | ||
|
||
expiration: | ||
# delete open sessions after 24 hours (default). If you set it to 0, no sessions will be deleted ever. | ||
open_sessions: 24 | ||
# delete redeemed session after x hours (default 0, which means: disabled) | ||
redeemed_sessions: 0 | ||
``` | ||
## Extending Double-Opt-In Form | ||
By default, the `DoubleOptInType` form type only contains a `emailAddress` field to keep users effort small. | ||
If you want to extend the form, you may want to use a symfony [form extension](https://symfony.com/doc/current/form/create_form_type_extension.html). | ||
|
||
Additional Info: | ||
- `emailAddress` is required and you're not allowed to remove it | ||
- Additional fields will be stored as array in the DoubleOptInSession in `additionalData` | ||
|
||
## Trash-Mail Protection | ||
TBD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.