我正在wordpress上工作,点击注销按钮,用户将使用<?php wp_logout(); ?>
功能当我遵循wordpress网站上的一些指导原则时,我知道它实际上删除了所有cookie,但会话和更新的数据库中的哪个表呢,实际上我正在使用buddypress查看当前活动的用户我得到了销毁cookie的代码。
function wp_clear_auth_cookie() {
do_action(\'clear_auth_cookie\');
setcookie(AUTH_COOKIE, \' \', time() - 31536000, ADMIN_COOKIE_PATH, COOKIE_DOMAIN);
setcookie(SECURE_AUTH_COOKIE, \' \', time() - 31536000, ADMIN_COOKIE_PATH, COOKIE_DOMAIN);
setcookie(AUTH_COOKIE, \' \', time() - 31536000, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN);
setcookie(SECURE_AUTH_COOKIE, \' \', time() - 31536000, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN);
setcookie(LOGGED_IN_COOKIE, \' \', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
setcookie(LOGGED_IN_COOKIE, \' \', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);
// Old cookies
setcookie(AUTH_COOKIE, \' \', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
setcookie(AUTH_COOKIE, \' \', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);
setcookie(SECURE_AUTH_COOKIE, \' \', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
setcookie(SECURE_AUTH_COOKIE, \' \', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);
// Even older cookies
setcookie(USER_COOKIE, \' \', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
setcookie(PASS_COOKIE, \' \', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
setcookie(USER_COOKIE, \' \', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);
setcookie(PASS_COOKIE, \' \', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);
}
请帮忙,谢谢