Skip to content

Commit

Permalink
add allowed domains to self registration
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristina Odziomkova committed Jan 10, 2024
1 parent c31097f commit d6b4fe2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pages/basic-features/users.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ Craftable PRO comes with CRUD for users where you can manage who has the access
<br />
<Image alt="Registration" src="/images/register.png" />

You can enable self-registration by editing the Craftable PRO config and setting `enabled` in `self_registration` to `true`. You can also set the default role for newly registered users. This is discussed more in the section [Roles & Permissions](/basic-features/roles-permissions#default-role-after-registration).
You can enable self-registration by editing the Craftable PRO config and setting `enabled` in `self_registration` to `true`.

You can also set the default role for newly registered users. This is discussed more in the section [Roles & Permissions](/basic-features/roles-permissions#default-role-after-registration).

To whitelist the email domains allowed for newly registered users, edit the `allowed_domains` setting. To allow any domain, set it to `['*']`.

```php filename="config/craftable-pro.php"
'self_registration' => [
Expand All @@ -20,6 +24,8 @@ You can enable self-registration by editing the Craftable PRO config and setting
// and if enabled, then which role(s) they should have assigned by default. Use role names here.
// It can be a string for one role or an array for multiple roles.
'default_role' => 'Guest',

'allowed_domains' => [] // use * for allowing any domain
],
```

Expand Down

0 comments on commit d6b4fe2

Please sign in to comment.