User registration
We have already seen how new users can be created. In addition to creating users from the Manager interface, users can also be allowed to register from a Web interface. Such users can also be assigned to a default user group.
Showing a signup form
To show a signup form, we will use a snippet (WebSignup) that comes bundled with MODx.
1. Create a new resource, and fill in the following information:
Field Name
Value
Title
Signup Form
Uses Template
Learning MODx default template
Resource Content
[!WebSignup!]
2. Click on the Save button.
Notice that the content of the document is only [!WebSignup!]
, which is a call to the snippet WebSignup
, which displays a user registration form.
Now preview the page and it will look like the example shown in the following screenshot:
Joining a default group
To assign registering users to the Friends user group, change the Resource Content field on the sign up form that we have just created to the following:
[!WebSignup? &groups=`Friends...