5

How can we keep users logged in only to their site and not to entire network?

If they visit other sites on the network I want to be the same as they visit any other typical website on the internet.

1 Answer 1

3

As far as I remember the users in multisite are shared. They are tracked in one database table and use same cookie for authentication.

The more practical approach is to track not merely login status, but capabilities. Users should be exposed to actions/information that they can perform/see, according to their Role on specific site.

You don't cover your use case in sufficient detail to advise on how that might apply to it.

3
  • thank you for your answer. I can work with capabilities just Ι thought if there was any easy built-in way to keep users logged-out from other sites. For example when a user is logged-in and he visits any other site in network he can see the admin bar. I know how to hide the admin bar but the user is still logged-in. Commented May 28, 2016 at 13:56
  • I answered a similar question over here. Is that what you're looking for?
    – Pat J
    Commented May 28, 2016 at 14:48
  • @PatJ I saw your answer before I post but it's not what I am looking for. I think your answer is more close to is_user_member_of_blog() function. Commented May 28, 2016 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.