The Ultimate Toolbox for creating amazing web sites!
Login Tools - User Roles
User roles (also known as user groups) are used to create different types of users for protected page. This makes it possible to give groups of (logged in) users access to specific pages only. For example, Administrator, Member or Guest.
Important notes: - This tutorial assumes that you are already familiar with the login tools and read the related tutorials to setup the basics. - User roles are only available for MySQL databases, so this functionality is not available for the CSV (flat file) database type!
Setup user roles
User roles can be configured in the properties of the Login Admin object. Here you can add, edit and remove roles. The roles apply to the entire project, so if you change them here, they will be updated for the login tools in all pages of the project.
Assign user roles to users (online)
After setting up the user roles (and publishing the login admin page), you can assign the role to users via the online administrator tool.
Assign user roles to pages
The 'Protected Page' object must be added to each page you want to protect. In the 'User Roles' property you can specify which user roles have access the page. You can select multiple roles. If nothing is selected then all logged in users will have access to the page.
Redirect users based on user role
The 'User Redirect' object allows you to redirect users to a specific page based on their user name or user role. Use brackets, to indicate that you want to use a user role. For example: [guest] or [member]