=========================== User Authentication Pages =========================== Some sites require user accounts. This can be useful for when you want to restrict access to certain content. Glass doesn't display any of these pages by default, but there are only a few steps to take to expose some good default forms. Expose default user auth forms ------------------------------ Add the following pages to your site. As long as your site has a templates/base.html file that contains a `{% content %}` tag, these pages will extend from that area. If your template structure is different from that, you'll need to create a template for each of these pages. For now, we'll assume that your template follows those defaults. Add these pages with the following URLs. Assign them to any template. (These are special URLs, and the 'template' value doesn't matter here.) * `login` * `register` (This requires re:captcha integration. More on that below.) * `forgot_password` (This form sends an e-mail with the `/reset_password` link.) * `reset_password` (This form is sent by an admin to an e-mail address and requires a token that is only good for 24 hours.) Customized templates for user auth forms ---------------------------------------- Follow a particular template pattern to completely customize your user auth templates. This is helpful when you want to pass certain permissions or user groups every time a person registers for a site. You can also put custom instructions on these pages, and even add admin-editable fields above or below the forms. To use custom templates, create the same pages as above after you've added the following templates to your site: * `templates/registration/login.html` * `templates/registration/register.html` * `templates/registration/forgot_password.html` * `templates/registration/reset_password.html` It's easiest to start with the default forms and build on as necessary, but we'd rather not post the code here. [Contact us for a copy of these files](https://www.website.glass/#contact) and we'll upload the defaults to your site for you. Registration link options ------------------------------ "Site Groups" are the way that protected content is handled on Glass. There's currently no interface for you to create site groups – we'll need to do that for you. But once they're set up, site admins can add or remove users to as many site groups as necessary. Once a site group is created, there are two ways to invite new users to the group: 1. Create the user in the Control Panel here: http://website.glass/sites/www.your-site.com/add_user. That will allow the site admin to set the defaults correctly, and send an e-mail to the user requesting that they set their own password. Or: 2. Create a customized registration link and e-mail the user manually. The user has to create their own account, but this adds the flexibility for the user to use whichever e-mail they'd like. For this option, the link should look like this: `your-site.com/register?site_group=site_groupname&next=your/selected/protected-page` Manage users with the Control Panel ------------------------------------------- Site administrators have the ability to add users, change permissions, or revoke access to site groups from within the control panel, here: `http://website.glass/sites/your-site.com/users`