Magnolia 5.5 reached end of life on November 15, 2019. This branch is no longer supported, see End-of-life policy.
Magnolia's Public User Registration module allows users to register an account on the public site. This page explains how to use the module to set up public user registration and protected pages that are available only to users who have registered and logged in.
The tutorial takes you through the process of:
...
The Public User Registration module includes all the necessary components to implement PUR on your site.
You can make the components available on any page any page template. The components will be used on Creatingpages pages for registration, login and related PUR tasks.
The Travel demo's Public Users template makes the components available in main
area of the page. The example uses this template. See Area definition for more.
Localtab Group | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
...
Always
registration strategy enables users immediately. A user can access restricted content straight after registration. MailChangePasswordLinkStrategy
sends an email to the user who submits the password retrieval form. A link in the email directs the user to the example /change-club-password
page. sportstation-pur
group in Settingpermissions Setting permissions (below). default
to ensure that users assigned only the anomymous
role cannot access restricted content. These options are configured in /moudlesmodules/public-user-registration/config/configurations/sportstation
.
...
At this stage, publish the work to date to the public instance. We Settingpermissions and TestingthePURsetup set permissions and test the setup on the public site because this is where it will be used and anonymous users have different permissions on the author and public instances by default.
Publish:
On the public instance, first restrict anonymous access to content reserved for registered users and then give registered users access to this content
...
Next create a new group named after the value in the defaultRoles
ConfiguringthePURmodule configuration property (sportstation-pur
in the example) and assign the new role to the new group. Users in this group also need other basic roles.
...
superuser
and then log out by adding the ?mgnlLogout=true
parameter to the URL. The restricted content disappears and the page redirects to the login form page configured in the Addingaclientcallbacktothesecurityfilter security callback. passwordRetrievalStrategy
ConfiguringthePURmodule configuration) where you can choose a new password.defaultRoles
ConfiguringthePURmodule configuration.