with module domain-acces, we can manage domains and subdomains, example:
- domain.com is my first domain.
- user1.domain.com is affected to user1
- user2.domain.com is affected to user2
but user1 can connect to user2.domain.com that is my problem.
Unfortunately, it looks like this isn't what Domain Access was intended to do, as its focus is "sharing information across subdomains" rather than restricting it:
In the comments there is a link to a code library that can achieve what you want, however.