Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

BP_Members_Admin::get_user_id()

Get the user ID.


Description Description

Look for $_GET[‘user_id’]. If anything else, force the user ID to the current user’s ID so they aren’t left without a user to edit.


Return Return

(int)


Top ↑

Source Source

File: bp-members/classes/class-bp-members-admin.php

	private function get_user_id() {
		if ( ! empty( $this->user_id ) ) {
			return $this->user_id;
		}

		$this->user_id = (int) get_current_user_id();

		// We'll need a user ID when not on self profile.
		if ( ! empty( $_GET['user_id'] ) ) {
			$this->user_id = (int) $_GET['user_id'];
		}

		return $this->user_id;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.