1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Clearing the Cookie Jar from External

Discussion in 'XenForo Development Discussions' started by LPH, Mar 28, 2016.

  1. LPH

    LPH Well-Known Member

    An external login relies on the cookies of XenForo and authorizes the cookies via a pluggable WordPress function.

    function wp_validate_auth_cookie$cookie ''$scheme '' ) {

    $visitor XenWord::getVisitor();
    $user_id $visitor['user_id'];

        if ( 
    $user_id !== ) {

    This is very slick but I need to figure out how to do clear the cookies on logout.


    function wp_clear_auth_cookie() {
    // empty because I'm looking at the cookie jar

    xenword_cookie_expiration$expiration$user_id$remember ) {
    $remember $expiration : -600;

    First, I'm guessing that the wp_clear_auth_cookie() method should mimic the reset() in the cookie jar but only for the particular user. Next, the cookie_expiration should also be for a particular user.

Share This Page