Hello
In my cake app, each user has their own profile page, which is
http://www.example.com/users/profile/{user-name}
When user's join my website, I want to give them the ability to attach
a domain name to their profile if they choose. So for user-a, a
visitor who goes to http://www.user-a.com
I do a lot of domain-specific stuff for dealing with configurations.
Your new friend is called $_SERVER['SERVER_NAME'] :)
I parse that to pick out the part of the domain name I need to load
the correct configuration.
You can do the same and use that to load the correct user profile.
I would try