bp_member_switching_get_olduser_cookie()

Gets the value of the cookie containing the originating user.

Description

Return

(string|false) The old user cookie, or boolean false if there isn't one.

Source

File: bp-members/bp-members-functions.php

3977
3978
3979
3980
3981
3982
3983
function bp_member_switching_get_olduser_cookie() {
    if ( isset( $_COOKIE[ BP_MEMBER_SWITCHING_OLDUSER_COOKIE ] ) ) {
        return wp_unslash( $_COOKIE[ BP_MEMBER_SWITCHING_OLDUSER_COOKIE ] ); // WPCS: sanitization ok
    } else {
        return false;
    }
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.