Description
The siteId of the primary site is explicitly passed in when generating {{ link }} urls (e.g. as password reset link, account activation, etc. in a system message). The code is here:
https://github.com/craftcms/cms/blob/develop/src/services/Users.php#L1079-L1081
This is because all users are 'global' within the same craft install.
Makes sense, from a developers' point of view. But less for users imho
This creates unwanted behaviour when applied to a multisite setup like mine (and hopefully others as well :p), that currently has 3 domains and 4 'sites' (1 domain has two languages). The 3 domains have different looks and feels.
And in particular: 1 domain (which is not the primary domain) does something for a specific usergroup that doesn't do anything with the other domains.
Steps to reproduce
- So when a user signs up on my custom registration form
- they are added to this specific user group
- receive the email activation link, but are thus sent to another domain with (slightly) another look and feel
- complete the activation process there
- and are then redirected to the homepage of the primary domain. In short: they are lost.
They should:
- receive an activation email with a {{ link }} that points to the domain where they signed up
- and upon activation
- they should be redirected to a page on that domain, not a completely other (in their point of view, they don't know or care about the way my database is structured)
So I think it would be a nice feature if system messages optionally become multisite-aware. By default the primary domain is used, unless for a specific site I don't want to
Additional info
- Craft version: pro 3.0.12
- PHP version: 7.1
- Database driver & version: mysql
- Plugins & versions: for the signup / registration process: a custom plugin that hooks into craftcms default behaviour
Description
The siteId of the primary site is explicitly passed in when generating {{ link }} urls (e.g. as password reset link, account activation, etc. in a system message). The code is here:
https://github.com/craftcms/cms/blob/develop/src/services/Users.php#L1079-L1081
This is because all users are 'global' within the same craft install.
Makes sense, from a developers' point of view. But less for users imho
This creates unwanted behaviour when applied to a multisite setup like mine (and hopefully others as well :p), that currently has 3 domains and 4 'sites' (1 domain has two languages). The 3 domains have different looks and feels.
And in particular: 1 domain (which is not the primary domain) does something for a specific usergroup that doesn't do anything with the other domains.
Steps to reproduce
They should:
So I think it would be a nice feature if system messages optionally become multisite-aware. By default the primary domain is used, unless for a specific site I don't want to
Additional info