BP_Core_Members_Switching::switch_back_url( WP_User $user )

Returns the nonce-secured URL needed to switch back to the originating user.

Description

Parameters

$user

(Required) The old user.

Return

(string) The required URL.

Source

File: bp-members/classes/class-bp-core-members-switching.php

	public static function switch_back_url( WP_User $user ) {
		return wp_nonce_url( add_query_arg( array(
			'action' => 'switch_to_olduser',
			'nr'     => 1,
		), wp_login_url() ), "switch_to_olduser_{$user->ID}" );
	}

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.