Finisher\GenerateAuthCode
Generates a unique token for a database entry.
This can be users for FE user registration or newsletter registration.
Properties
.table
The table where the form data was saved to.
This is needed for the auth code generation.
Data type
String | cObj
Version added
1.0.0
.uidField
Enter the field name to use as uid field, when selecting the record to calculate the hash for.
Data type
String | cObj
Default value
uid
Version added
1.7.0
.uid
Enter a uid to use, when selecting the record to calculate the hash for.
Use this to calculate a hash for a record without having to call Finisher\DB before.
If this is not set, Finisher\GenerateAuthCode uses the information provided by Finisher\DB.
Data type
String | Array
Version added
1.7.0
.authCodePage
This is the page used for the generation of the auth code link which can be used in emails.
If no page is configured in TypoScript, Formhandler will take the “Redirect Page” entered in the Flexform or the current page ID if nothing is defined in the flexform either.
Data type
Integer | String | cObj
Default value
Current PID
Version added
1.0.0
Important
The finisher stores the generated code and the link, so that they can be used in other components and email templates later on. You can use the markers ###auth_code###, ###value_generated_authCode### and ###value_authCodeUrl### to access these values.
.excludeParams
Allows to remove certain parameters from the auth code URL.
The default URL has the parameters table, uid, uidField and authCode. This option allows to remove table and uidField from the URL to make it shorter. The parameters authCode and uid are required!
Data type
Comma separated list | cObj
Version added
2.0.0
Important
If you remove the parameters table or uidField, you have to configure them in PreProcessor\ValidateAuthCode.
Example code
excludeParams = table,uidField
.selectFields
The database fields to be used to generate the auth code.
Data type
Comma separated list | cObj
Default value
*
Version added
1.0.0
.customFormValuesPrefix
Use a custom prefix for the GET parameters of the validation link. This is useful if your activation form uses another formValuesPrefix than the form generating the auth code.
Data type
String | cObj
Version added
2.1.0