List which sites a multisite user belongs to?
-
I’d like to know, on a page, how to generate a list of links to sites a user belongs to in a multisite network?
Here’s my scenario:
Currently my clients log into the main ‘master’ site, and a login redirect plugin sends them to their own site which I’m developing for them.
i.e. Client ‘A’ logs in at the main site and gets re-direted to Client ‘A’ site.
Client ‘B’ logis in at the main site and gets sent to Client ‘B’ site.Currently I do this with 6 or 7 clients and their respective sites. I have to set each client up as a user on the main site as well as on their own site and then use a redirect plugin to automatically send them to their own site after logging in based upon their user name.
Now I have a client which I am developing 3 themes / sites for. I only want them to need to remember one username and password. What I’d like is once they have logged in at the main site they are taken to a page on the main site (via a redirect plugin to keep them out of the backend) where they are shown a list of links to sites they are a member of (within the multisite network) allowing them to chose which site they visit.
Is it possible to do this? Is there a plugin? or maybe a snippet of PHP like get_user_sites() or similar?
Many thanks – really grateful for any help!
Stef
- The topic ‘List which sites a multisite user belongs to?’ is closed to new replies.