Login / Status
developer.Resource
Home . Documentation . Document Library . Extension Manuals
Sponsors
hosted by punkt.deTYPO3 and Open Source Magazine

1.5. Configuration

Configuration steps

These are the steps to configuring the Front End User Registration extension:

  1. Install the extension using the Extension Manager. If not already installed, you will be requested to install the extension Static Info Tables (static_info_tables). You should also consider installing extensions New Login Box (newloginbox) and Static Methods for Extensions from the year 2007 (div2007). For md5 password encryption you will also need KB MD5 FE Password (kb_md5fepw).

  2. Add one of the following static templates to your TypoScript template: 'FE User Registration CSS-styled' or 'FE User Registration Old Style'. If you select the CSS-styled template, make sure you have installed version 2.0.1+ of the extension Static Info Tables (static_info_tables).

  3. Create a System Folder page that will contain the records of frontend users created by the extension. Set the TS template constant pid to the page id of this folder. Under the System Folder, create two Frontend User Groups. Set  the TS template constant userGroupUponRegistration to the uid of the first group and constant userGroupAfterConfirmation to the uid of the second group. The second group gives access to the pages targeted at the registered front end users, while the first group does not.

  4. Create a page or reuse a top level page, setting the Page “General Storage Storage” to the System Folder that will contain the front end user records created by the extension. Insert the New Login Box on the page. Then, on the same page, after the New Login Box, insert the Front End User Registration extension, using the default display mode (or the CODE field remains empty), but setting the Starting Point to the System Folder that will contain the Frontend user records created. Set the TS template constant loginPID to the page id of this page.

  5. Create a second page after the previous one and set the access general options to “Hide at login”. Insert the Front End User Registration extension, setting the display mode to Create (CODE to CREATE), and the Starting Point to the System Folder that will contain the Frontend user records.  Note that the access restriction should be set on the page, not on the content elements. Set the TS template constant registerPID to the page id of this page.

  6. Create a third page limiting access to this page to the second user group you created. Insert the Front End User Registration extension, setting the display mode to Edit (CODE to EDIT), and the Starting Point to the System Folder that will contain the front end user records.  Note that the access restriction should be set on the page, not on the content elements. Set the TS template constant editPID to the page id of this page.

  7. Create a fourth page setting the page type to 'Advanced' and click the checkbox at “Hide in menu”. Insert the Front End User Registration extension, using the Default display mode (leaving the CODE empty) and setting the Starting Point to the System Folder that will contain the front end user records.  Note that the access restriction should be set on the page, not on the content elements.  Set the TS template constant confirmPID to the page id of this page.

  8. Decide which fields you want included on the registration form and, among those, which ones you want to be required in order to register. Set TS template constants formFields and requiredFields.

  9. Review the extension constants described below. All these properties may be conveniently edited using the Constant Editor TS template tool.  If you do not use the Constant Editor to configure the extension, please note the form of the constants assignments in the constants section of your TS template:plugin.tx_srfeuserregister_pi1.property = valueor if you assign multiple values:plugin.tx_srfeuserregister_pi1 { property = value... }

  10. TypoScript Setup:config.sys_language_uid = 0config.language = deconfig.locale_all = germanconfig.typolinkLinkAccessRestrictedPages = NONE;

Upgrading to version 2+

When you upgrade from an older version to version 2+, you need to add a static template to your TS template, otherwise the extension will not work.

If you add the FE User Registration Old Style static template, the extension should function exactly the same way as version 1.6.8.

If you add the FE User Registration CSS-styled static template, you need to re-adapt your HTML template and your CSS styles. You should probably try it first with the default template and the default CSS styles.

Extension configuration variables

The Extension Manager installation dialog allows you to set the following extension configuration variables:

  1. Use flexforms: this variable enables the use of Flexforms in the backend. div2007 version 0.1.1+ must have been installed. Default is 1.

  2. Image upload folder: this is the name of the upload folder for images uploaded by Frontend users. The default value is uploads/tx_srfeuserregister. In some configurations, you may prefer to set it to uploads/pics – changes will update the TCA-definition of the image column of the fe_users table;

  3. Maximum image size: this is the maximum size in KB's an image may be to be uploaded by Frontend users. The default value is 250 – changes will update the TCA-definition of the image column of the fe_users table;

  4. Allowed image types:  this is the list of accepted file extensions for uploaded images. The default value is png, jpg, jpeg, gif, tif, tiff – changes will update the TCA-definition of the image column of the fe_users table.

TypoScript Constants

Please note that the following properties refer to TS template constants, not TS template setup.

If you do not use the Constant module_sys_dmail_categoryEditor to configure the extension, please note the form of the constants assignments in the constants section of your TS template: plugin.tx_srfeuserregister_pi1.property = value

Property:

Data type:

Description:

Default:

file.templateFile

string

File name of the HTML template

EXT:sr_feuser_register/pi1/tx_srfeuserregister_pi1_tmpl.tmpl

file.attachmentFile

string

File name of a file to be attached to the registration confirmation email.

EXT:sr_feuser_register/pi1/tx_srfeuserregister_pi1_sample.txt

enableHTMLMail

boolean

If set, emails sent to the Frontend user will be sent in HTML format. A plain text version will always be included in the emails.

1

enableEmailAttachment

boolean

If set, and if enableHTMLMail is also set, the attachment file - specified by file.attachmentFile - will be attached to the registration confirmation HTML email.

0

enableAutoLoginOnCreate

boolean

Enable auto-login on account creation: if set and if email confirmation is not set, the user will be automatically logged in upon creation of his(her) account.

Note: This property is disabled when useMd5Password is enabled.

0

enableAutoLoginOnConfirmation

boolean

If set, the user will be automatically logged in upon confirmation of his registration.

Note: This property is disabled when useMd5Password is enabled.

0

autoLoginRedirect_url

string

When auto login is enabled, URL to which the user may be redirected  upon login.

HTMLMailCSS

string

File name of  the HTML emails style sheet. If HTML emails are enabled, this file contains the CSS style sheet to be incorporated in these emails.

EXT:sr_feuser_register/pi1/tx_srfeuserregister_htmlmail.css

wrap1

wrap

Wrap used in global markers in the HTML template

Note: In the example template, this wraps some major prompts.

<b> | </b>

wrap2

wrap

Wrap used in global markers in the HTML template

Note: In the example template, this wraps the error messages.

<font color="red" ><b> | </b></font>

wrap3

wrap

Wrap used in global markers in the HTML template

Note: In the example template, this wraps  some notices.

<em> | </em>

color1

HTML-color

Color used in global markers in the HTML template

#cccccc

color2

HTML-color

Color used in global markers in the HTML template

#999999

color3

HTML-color

Color used in global markers in the HTML template

#333333

email

string

Administration email address. This email address will be the sender email address and the recipient of administrator notifications.

MyTypo3Site@mydomain.org

siteName

string

Name of the registering site. If set, this will be used as the email address name in all sent emails and may be used as a signature on the mails.

My Typo3 Site

formFields

string

List of fields to be included on the Frontend user registration form. Should be a subset of the columns of the 'fe_users' table.

Note: If Direct Mail (direct_mail) extension is not installed, fields module_sys_dmail_category and module_sys_dmail_html are ignored (removed from the list).

username,password, first_name,last_name,date_of_birth,email, address,city,zone, static_info_country,zip, telephone,language, title,company,www, module_sys_dmail_category, module_sys_dmail_html,disable

requiredFields

string

List of fields that must be filled in on the Frontend user registration form. Should be a subset of the list specified on the 'formFields' property.

username,password,name,email

authcodeFields

string

Authentication code fields: this is the list of fields that are used in the calculation of authentication codes.

Note that the Direct Mail extension uses only uid in its calculations.

uid

codeLength

int

Length of the authentication codes.

Note that the Direct Mail extension uses only 8 in its calculations.

8

formName

string

Name of the HTML form. The name is also referenced on the  onChangeCountryAttribute. See below.

fe_users_form

onChangeCountryAttribute

string

Javascript to execute when the selected country is changed in the country selector box.

javascript:window.document.forms['fe_users_form'].submit();

defaultCODE

string

Default CODE, when not specified on the inserted extension record. May be CREATE or EDIT or empty.

None

pid

page_id

Frontend user records PID. If the records edited/created are located in another page than the 'current,' the PID of that page should be specified here.

None

module_sys_dmail_category_PIDLIST

string

PID list for Direct Mail categories. The Direct mail categories used by the plugin will be restricted to those found on the pages identified by the PID's in this list.

None

pidTitleOverride

string

The specified string will override the title of the System Folder page specified by the pid property. The title of the System Folder is used in some online and email messages in the default HTML template.

None

registerPID

page_id

Registration page PID: PID of the page on which the extension is inserted with the intent of serving as the Frontend user registration page. If not set, will default to 'current' page.

None

editPID

page_id

Profile editing page PID: PID of the page on which the extension is inserted with the intent of serving as the Frontend user profile editing page. If not set, will default to 'current' page.

None

linkToPID

page_id

Link to after edit PID: PID of a page to be linked to after the user has completed the editing of his/her profile. See also linkToPIDAddButton.

None

linkToPIDAddButton

boolean

Add a button to link to after edit. If set, an additional button is displayed on the profile editing page, or on the profile editing preview page, to save the changes and link to the page specified by linkToPID.

0

confirmPID

page_id

Confirmation page PID: PID of the page on which the extension is inserted with the intent of serving as the Frontend user confirmation page (or setfixed page!). Meaningful only if email confirmation request is enabled.

None

confirmInvitationPID

page_id

Confirmation of invitation page PID: PID of the page on which the extension is inserted with the intent of serving as the Frontend user confirmation page (or setfixed page!) when replying to an invitation. Meaningful only if email confirmation request is enabled.

Note: If not set, will take the same value as confirmPID.

None

confirmType

int

Confirmation page Type: Type (or pageNum) of the confirmation page. Meaningful only if email confirmation request is enabled.

0

loginPID

page_id

Login page PID: PID of the page on which the New login box extension is inserted with the intent of serving as the Frontend user login page. If not set, will default to 'current' page.

None

enablePreviewRegister

boolean

Enable preview on registration. If set, the registration dialog will include a preview of the Frontend user data before it is saved.

1

enablePreviewEdit

boolean

Enable preview on profile update. If set, the profile update dialog will include a preview of the Frontend user data before it is saved.

1

enableAdminReview

boolean

Enable administrative review. If set, the site administrator will be asked to accept the registration before it becomes enabled.

Note: this feature is available only when using static template FE User Registration CSS-styled.

0

enableEmailConfirmation

boolean

Enable email confirmation request: If set, an email will be sent to the prospective Frontend user requesting a confirmation of registration.

1

useEmailAsUsername

boolean

Enable the use of the email address as username.

Note: If enableEmailConfirmation is also set, the email field will NOT be included in the front end user profile editing form.

0

generateUsername

boolean

Generate the username. If set, the username is assumed to be generated.

Note: Hook registrationProcess_beforeConfirmCreate must be configured.

0

generatePassword

int

Generate the password: If non-zero, a random password is generated. The number of characters in the password is given by this parameter.

0

allowUserGroupSelection

boolean

Allow selection of usergroup on registration. If set, the user may select to adhere to user group(s) when registering.

Note: The selectable usergroups must be located in the page identified by the pid constant.

Note: If constants userGroupUponRegistration and userGroupAfterConfirmation are set, the usergroups they specify are not selectable.

Note: Field usergroup must be included in the list specified by constant formFields.

0

allowUserGroupUpdate

boolean

Allow selection of usergroup on editing. If set, the user may edit the list of user groups to which he(she) belongs.

Note: See also constant allowUserGroupSelection.

0

allowMultipleUserGroupSelection

boolean

Allow selection of multiple usergroups. If set, the user may select to adhere to multiple user groups.

Note: See also constants allowUserGroupSelection and allowUserGroupUpdate.

0

enableEmailOnApprove

boolean

Enable email on approval. If set, an email will be sent to the Frontend user when he confirms his registration. Effective only if email confirmation request is enabled.

1

enableEmailOnRefuse

boolean

Enable email on refusal: If set, an email will be sent to the prospective Frontend user when he refuses to confirm his registration. Effective only if email confirmation request is enabled.

1

enableEmailOnRegister

boolean

Enable email on registration: If set, an email will be sent to the Frontend user confirming his registration. Ignored if email confirmation request is enabled.

1

enableEmailOnUpdate

int

Enable email on profile update. If set to 1, an email will be sent to the Frontend user to confirm the update of his profile. If set to 2, only the changed fields will be sent.

1

enableEmailOnDelete

boolean

Enable email on delete. If set, an email will be sent to the Frontend user to confirm the deletion of his account.

1

enableAdminNotifyConfirmation

boolean

Enable admin notification on confirmation request. If set, an email will be sent to the site administrator when a request for confirmation of registration is sent to a user.

1

enableAdminNotifyOnApprove

boolean

Enable admin notification on approval: If set, an email will be sent to the site administrator when a user confirms his registration.

1

enableAdminNotifyOnRefuse

boolean

Enable admin notification on refusal. If set, an email will be sent to the site administrator when a user refuses to confirm his registration.

1

enableAdminNotifyOnRegister

boolean

Enable admin notification on registration. If set, an email will be sent to the site administrator when a user registers. This is ignored if email confirmation request is enabled.

1

enableAdminNotifyOnUpdate

boolean

Enable admin notification on update: If set, an email will be sent to the site administrator when a user updates his profile.

1

enableAdminNotifyOnDelete

boolean

Enable admin notification on deletion: If set, an email will be sent to the site administrator when a user deletes his account.

1

enableAdminNotifyOnAdminAccept

boolean

Enable admin notification on approval by admin: If set, an email will be sent to the site administration when a registration is accepted by the administration.

1

enableAdminNotifyOnAdminRefuse

boolean

Enable admin notification on refusal by admin: If set, an email will be sent to the site administration when a registration is refused by the administration.

1

dmailCheckedUponRegistration

boolean

Check all the checkboxes for Direct Mail categories in creation dialogues.

0

userGroupUponRegistration

string

User group(s) upon registration: The value of the user group field. Must be a list of integers WITHOUT spaces between the comma separated values! Furthermore, these integers MUST point to actual fe_groups records!

None

userGroupAfterConfirmation

string

User group(s) after confirmation: The value of the user group(s) assigned to the Frontend user after receipt of his confirmation.

None

userGroupAfterAcceptation

string

User group(s) after acceptation: The value of the user group(s) assigned to the front end user after acceptation of his(her) registration, when the administrative review is enabled.

Note: If administrative review is not enabled, this property is ignored.

None

passwordAtLeast

int

Minimum password length: The minimum number of characters that the password must contain.

5

passwordAtMost

int

Maximum password length: The maximum number of characters that the password may contain.

40

usernameAtLeast

int

Minimum username length: The minimum number of characters that the username must contain.

6

usernameAtMost

int

Maximum username length: The maximum number of characters that the username may contain.

50

nameAtMost

int

Maximum name length: The maximum number of characters that the name of the Frontend user may contain.

80

forceFileDelete

boolean

If set, on record deletion, related images and files will be deleted even if the record in the database is only marked 'deleted.'

1

maxImages

int

Number of images that may be uploaded.

Value: An integer larger than 0 and smaller than 7.

Note: Has no effect if the field 'image' is not in the list formFields.

6

salutation

string

If set, should be either 'formal' or 'informal'.

Note: This property will change the salutation mode used in the labels displayed in the front end, provided that this is meaningful in the language being displayed and that translators have provided the informal version.

None

useMd5Password

boolean

Enable md5 password encryption.

Note: If set, passwords will be encrypted. Consider to install an extension like kb_md5fepw and the newloginbox.

0

useShortUrls

boolean

Enable the use of short URL's in email messages sent to users is enabled.

0

shortUrlLife

int+

Short URL cache lifespan. This is the number of days that short URL's will be kept in the DB. After this delay, the short URL's will be removed. Confirmation URL's included in email messages older than this number of days will not work.

30

dateFormat

string

date format

You should also change the error message output if you change this.

day:

  1. d - day of the month, 2 digits with leading zeros; i.e. "01" to "31"

  2. j - day of the month without leading zeros; i.e. "1" to "31"

month:

  1. m - month; i.e. "01" to "12"

  2. n - month without leading zeros; i.e. "1" to "12"

year:

  1. Y - year, 4 digits; e.g. "1999"

  2. y - year, 2 digits; e.g. "99"

Y-m-d

dateSplit

string

split characters for the dateFormat.  This is a regular expression.

Attention: If you want to display a dot '.' in the date format, then you must use '\.' in the expression because the dot '.' has the special meaning to be a placeholder for any character.

-

TypoScript Setup

When installing this extension, you should NOT use the following setting:

config.disableAllHeaderCode = 1

This setting will prevent the inclusion of Javascript essential to the correct behavior of the profile editing features.

Property:

Data type:

Description:

Default:

extraLabels

string

Comma-separated list of additional labels to use in the HTML template.

See section Labels and localization about adding extra  labels.

None

templateFile

string

Same as file.templateFile from Constants. This is needed under Setup for language specific template files only.

where.static_countries

string

Set a SQL WHERE condition to follow for the selected country in the static_countries table of the static_info_tables extension. Maybe you want to see only users from EU countries on your site.

Example:

plugin.plugin.tx_srfeuserregister_pi1 { where.static_countries = cn_eu_member = 1}

evalFunc

function-name

additional evaluation function for the records

eg "user_myfunction" or "user_myclass->main"

userFunc_updateArray

function-name

User function to update the records

CODE specific

Use the code field as the first parameter.

edit.overrideValues.usergroup = 3

Property:

Data type:

Description:

Default:

defaultValues

array of strings

Default values for the fields.

overrrideValues

array of strings/stdWrap

Array of field names for which a fixed value or stdWrap function shall be applied.

The stdWrap e.g. can be used when FE Users should not be able to change a field, which they must fill out only at registration.

Example:

overrideValues {
        username = 
        usergroup >
        disable = 0
        by_invitation >        user_myfield = {TSFE:fe_user|user|user_myfield}
        user_myfield.insertData = 1

}

None

evalValues

array of strings

Check functions to be applied on the fields.

Configuration of Addresses

You can use the tt_address table instead of fe_users. If you set conf.tt_address, then tt_address and these settings will be used instead of the other settings for the fe_users table.

Example:

plugin.tt_products.conf.tt_address.invite.generateUserName = 1

Property:

Data type:

Description:

Default:

conf

array of array

Same as the topic 'CODE specific'.

fileadmin/img