Automatically assigning self-serve users to companies
Overview
Moodle allows users to be created either by self-signup (via email) or automatically by connecting the Moodle site to an outside authority such as O365 or LDAP. IOMAD takes it a step further by offering the functionality to assign those users to a predetermined company.
Self-signup is configured through the local IOMAD Signup plugin and the company settings. At a basic level, IOMAD will listen for new accounts created using one or more authentication types, check if the email domain matches one of the company domains and, if so, assign this new user to the company.
Configuration
Setting up the Local signup plugin
- In Site administration, go to Plugins.
- Scroll down to the Local plugins section and click on IOMAD, then select the Signup settings tab. You will be presented with a page which looks like this:

The plugin is switched on by default, but none of the authentication methods are selected, so nothing happens. - To enable this for Email authentication (although the steps are the same for any of the other authentication types where the user is created by the user themselves instead of by a manager or admin), you need to click on the email checkbox in Select authentication types. This enables IOMAD to listen for users created with this selected authentication type. You can select multiple types here, and they will all be processed.
- (Optional) At the bottom of the page, there is the option to select a default company, which is where any user of this authentication type will end up if they don’t match any pre-determined company.
Setting up the domains for a company
- Go to the IOMAD dashboard and select the company you want to enable this feature for.
- Click on Edit company in the Company tab and open the Advanced company settings section. You will be presented with a page which looks like this:

- In the text field for List of company domains, add all of the potential email domains that are used by this company. So if the company is called Test Company and the emails are going to be from either @testcompany.co.uk, @testcompany.com or @testcompany.org, add the domains on separate lines in this field.
- Click to save the company. Now, when anyone creates a self-sign-up account using one of the Test Company email accounts, they will be automatically put into the Test Company tenant.
Advanced options
If you can’t guarantee the email domain for this tenant, or you want to provide the company branding to the user before they even log in or sign up, you can achieve this by either passing parameters to the login/signup page or by setting up different URLs per tenant.
Need more info? See the article on Setting up different URLs per tenant.