This module adds the ability to invite users to a secure website (e.g. Intranet or Extranet).
- silverstripe/framework ^4
composer require dynamic/silverstripe-user-invitation
See License
This module makes it posible to invite users that you would like to register on your site. Users can be invited from either a:
- Quick-entry invitation form (By default only first name and email fields are required to invite someone)
- Sends email invitations to recipient
- Supports optional user group assignment (See below for how to enforce this group selection)
- Invitation expiry can be set via configuration.
- Default SilverStripe member validation is applied.
- Create and send invites from CMS admin interface
Place the following in your mysite/_config/config.yml
Dynamic\SilverStripe\UserInvitations\Model\UserInvitation:
force_require_group: true
To update the base template use updateMainTemplates
. It defaults to Page
.
/**
* @param array $mainTemplates
*/
public function updateMainTemplates(&$mainTemplates)
{
array_unshift($mainTemplates, 'InvitationPage');
}
You can set a custom 'BackURL', that the user will be redirected to, after having completed signup from invitation.
Dynamic\SilverStripe\UserInvitations\Control\UserController:
back_url: '/admin/'
This is done in your app/_config/email.yml file
SilverStripe\Control\Email\Email:
admin_email: #Default email this site sends emails from
[email protected]: 'Admin at example.com'
For easy email testing, use: https://mailcatcher.me/
Forked from FSWebWorks/silverstripe-user-invitation to upgrade for Silverstripe 4 & 5.
Bugs are tracked in the issues section of this repository. Before submitting an issue please read over existing issues to ensure yours is unique.
If the issue does look like a new bug:
- Create a new issue
- Describe the steps required to reproduce your issue, and the expected outcome. Unit tests, screenshots and screencasts can help here.
- Describe your environment as detailed as possible: SilverStripe version, Browser, PHP version, Operating System, any installed SilverStripe modules.
Please report security issues to the module maintainers directly. Please don't file security issues in the bugtracker.
If you would like to make contributions to the module please ensure you raise a pull request and discuss with the module maintainers.