User Registration Page Type

The user registration page type is the core of the user registration features of Pixelsilk. It allows site visitors to visit the page, fill out a form with their details, and be given a new user account that is valid on that website. Without it, the only way to add users in Pixelsilk is manually through the Admin UI (as well as manual API calls).

A standard, yet minimal user registration form may look like:

2011-02-16_111944.png

The four fields in the above form are all the required fields by the User Registration page type. In respective order, they are:

  • [[Username]] - The user enters the username that they would like to use.
  • [[EmailAddress]] - The user's email address.
  • [[Password]] - The user's desired password for the account.
  • [[PasswordConfirmation]] - The password must by re-typed correctly to verify the password.

Additionally, each field has respective InvalidText tokens:

  • [[UsernameInvalidText]] - If the username is empty, already taken on the site, or does not meet the length requirements defined by the site, this token will be populated with an error message.
  • [[EmailAddressInvalidText]] - If the email address is empty, already taken on the site, or not a valid email, this token will be populated with an error messaged.
  • [[PasswordInvalidText]] - If the password is empty or does not match the password rules defined by the site, this token will be populated with an error message.
  • [[PasswordConfirmationInvalidText]] - If the password confirmation does not match the password, this token will be populated with an error message.

All error messages can be customized in the Security settings section of Admin.

Creating a User Registration Page

To create a user registration page, first a page type must be created. Enter the Design are of Admin, and enter the Page Types tab. Click Add New Page Type, enter the name of the page type (such as "User Registration"), and select the base type as User Registration. Click save-button.pngto create the new Page Type.

2011-02-16_113421.png

Next, click the pencil pencil-button.pngof the new page type to edit it. Enter the Skins tab, and edit the Content skin. Note that although a [[Content]] token is present in the skin by default, a [[Content]] token has no behavior in a User Registration page type.

In this content skin you may skin your page as desired. The above example is skinned as the following:

<div>
  <h1>Register New Account</h1>
  <div>
    <label for="Username">Username:</label>
    <span>[[Username]]</span>
    <ins class="error">[[UsernameInvalidText]]</ins>
  </div>
  <div>
    <label for="EmailAddress">Email Address:</label>
    <span>[[EmailAddress]]</span>
    <ins class="error">[[EmailAddressInvalidText]]</ins>
  </div>
  <div>
    <label for="Password">Desired Password:</label>
    <span>[[Password]]</span>
    <ins class="error">[[PasswordInvalidText]]</ins>
  </div>
  <div>
    <label for="PasswordConfirmation">Confirm Password:</label>
    <span>[[PasswordConfirmation]]</span>
    <ins class="error">[[PasswordConfirmationInvalidText]]</ins>
  </div>
  <div>
    <input type="submit" value="Submit" />
  </div>
</div>

Note the submit button and lack of a <form> tag. Pixelsilk will auto-generate an appropriate <form> tag for the page type.

Post-Registration

After the user has registered, either they will be redirected back to the start page, or will be redirected to a configurable URL. This setting is defined in the Config tab of the Settings are of Admin.

  • AfterRegistrationUrl - The user, after successfully registering, will be redirected to this relative URL.

After registering on the site, the new user will be logged in. They may be redirected to the home page, or a custom "Registration Successful" page. This is up to the site owner.

Email Verification

When a user registers on the site, an email may optionally be sent, requiring the user to verify the email address. Only after the email is verified may the user log in to the site.

To enable Email Verification for User Registration, enter thesettings-area.png area of Admin, and stay in the the Security tab. Open the Email bar, and a check box will indicate whether users should require email verification before being able to log in to the site. Click save-button.png to save any changes (note that the bar may not close).

2011-02-16_131932.png

For more information about Email Verification, see the Email Verification Page Type page.

Username and Password Requirements

Users may optionally be limited in what usernames and passwords they may use on the site. For more information, see the Username and Password Requirements page.

Email As Username

Optionally, a site may forgo the use of usernames, and users can be identified via their email address. To enable the use of this feature, enter the settings-area.pngarea of Admin and stay in the Security tab. Open the Username setting bar, and check the Use email address as username setting. Click save-button.png to save any changes. A confirmation may appear stating that the change is irreversible. Note that this change can be undone at a later point, but all users who registered with usernames will continue to use email addresses to log in to the site.

When this feature is enabled:

  • The [[Username]] token in the User Registration page type will be disabled. Generally it is more user-friendly to remove the token altogether.
  • Users will log in with their email address. This should be conveyed to users on the Login Page.
  • Users who register will appear as email addresses in the users-area.pngarea of Admin.
  • When editing the user in the users-area.pngarea, the Username field is disabled.