Is there a is_user_logged_in() for multisite?
The way users work in a multisite scenario is that there is a single pool of users, who are then associated with blogs.
So, logged in status is common across all the blogs, but you can use is_blog_user($blog_id)
to determine whether the current logged in user is a member of that blog. An example:
1 2 3 | if (is_user_logged_in()) { if (is_blog_user(4)) echo "Current user is a member of blog 4"; } |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.