简体   繁体   English

使用wp_set_auth_cookie在WordPress中对用户进行身份验证

[英]Authenticating users in WordPress using wp_set_auth_cookie

If User X is currently logged in and wp_set_auth_cookie is used to authenticate User Z, is User X automatically logged out? 如果用户X当前已登录并且wp_set_auth_cookie用于验证用户Z,则用户X是否自动注销?

Please note I am referring to the users using the same browser window. 请注意,我指的是使用相同浏览器窗口的用户。

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

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. 您可以通过使用两个具有相同用户名的单独浏览器登录到一个WP站点来进行测试。 You'll see that you can navigate around the admin in both browsers fine. 您会看到,您可以在两种浏览器中都可以在管理员中浏览。 This fact holds true with different usernames as well. 这个事实也适用于不同的用户名。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM