BP_Groups_Member::promote( string $status = 'mod' )

Promote a member to a new status.


Parameters Parameters

$status

(string) (Optional) The new status. 'mod' or 'admin'.

Default value: 'mod'


Top ↑

Return Return

(bool) True on success, false on failure.


Source Source

File: bp-groups/classes/class-bp-groups-member.php

	public function promote( $status = 'mod' ) {
		if ( 'mod' == $status ) {
			$this->is_admin   = 0;
			$this->is_mod     = 1;
			$this->user_title = __( 'Group Mod', 'buddypress' );
		}

		if ( 'admin' == $status ) {
			$this->is_admin   = 1;
			$this->is_mod     = 0;
			$this->user_title = __( 'Group Admin', 'buddypress' );
		}

		return $this->save();
	}


Top ↑

Changelog Changelog

Changelog
Version Description
1.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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