Authenticating users in WordPress using wp_set_aut

2019-08-28 20:37发布

If User X is currently logged in and wp_set_auth_cookie is used to authenticate User Z, is User X automatically logged out?

Please note I am referring to the users using the same browser window.

https://codex.wordpress.org/Function_Reference/wp_set_auth_cookie

1条回答
forever°为你锁心
2楼-- · 2019-08-28 21:14

No. Even if the two users use the same username, they both can log in and use the site at the same time. You can test this by logging into a single WP site with on two separate browsers with the same user name. You'll see that you can navigate around the admin in both browsers fine. This fact holds true with different usernames as well.

查看更多
登录 后发表回答