最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugins - User Session and Stored Cookies not get removed

programmeradmin2浏览0评论

I am using below code to remove the user session, cookies etc, but its not working. Please help me to resolve this issues

  $userid = get_current_user_id(); //get current user id
  sleep(30); //to wait for 30 sec
  unset( $_COOKIE[$current_user] );
  setcookie( $userid, '', time() - (5) );
  wp_destroy_current_session([$userid]);
  wp_clear_auth_cookie();
  exit;
  wp_logout();

I am using this code in custom develop plugin.

发布评论

评论列表(0)

  1. 暂无评论