0

How can you leverage wp_set_auth_cookie to programmatically login a user on a specific blog in a multisite environment?

wp_set_auth_cookie doesn't allow you to set the target blog to authenticate the user under. I have a multisite/buddypress setup where activations happen on the primary domain. I want to then automatically authenticate that user not for the main site, but for one his site that was created on registration.

  • What kind of login you want ? How username and password will passed for login – TBI Infotech Aug 5 '14 at 7:04
  • more details please – Mark Kaplun Aug 5 '14 at 8:16
  • @MarkKaplun I've provided a more extensive explanation. Please let me know if that isn't sufficient. Thank you. – etc Aug 6 '14 at 3:34
0

In a wordpress network the users are of the network and not an individual blog in the network. This means that technically users do not login to a blog they can only login to the network.

If I understand your question correctly, you have nothing to do for what you want, this is how a network works - once you are logged-in, even if it was done in the context of a specific blog, you are logged-in to all blog (with totally different permission levels, but logged-in)

|improve this answer|||||
  • Thanks for your response. So there's no way to log them into their specific subdomain, correct? They'll still be asked to login again, which is what I'm trying to avoid. – etc Aug 7 '14 at 4:03
  • no, once they are logged into the main they are also logged to the others. – Mark Kaplun Aug 7 '14 at 4:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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