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

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.