本文整理匯總了PHP中BP_Groups_Member::unban方法的典型用法代碼示例。如果您正苦於以下問題:PHP BP_Groups_Member::unban方法的具體用法?PHP BP_Groups_Member::unban怎麽用?PHP BP_Groups_Member::unban使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類BP_Groups_Member
的用法示例。
在下文中一共展示了BP_Groups_Member::unban方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: bp_group_management_unban_member
function bp_group_management_unban_member($user_id, $group_id)
{
global $bp;
$member = new BP_Groups_Member($user_id, $group_id);
do_action('groups_unban_member', $group_id, $user_id);
return $member->unban();
}
示例2: groups_unban_member
/**
* Unban a member from a group.
*
* @param int $user_id ID of the user.
* @param int $group_id ID of the group.
*
* @return bool True on success, false on failure.
*/
function groups_unban_member($user_id, $group_id)
{
if (!bp_is_item_admin()) {
return false;
}
$member = new BP_Groups_Member($user_id, $group_id);
/**
* Fires before the unbanning of a member from a group.
*
* @since 1.0.0
*
* @param int $group_id ID of the group being unbanned from.
* @param int $user_id ID of the user being unbanned.
*/
do_action('groups_unban_member', $group_id, $user_id);
return $member->unban();
}
示例3: groups_unban_member
function groups_unban_member($user_id, $group_id)
{
if (!bp_is_item_admin()) {
return false;
}
$member = new BP_Groups_Member($user_id, $group_id);
do_action('groups_unban_member', $group_id, $user_id);
return $member->unban();
}
示例4: groups_unban_member
function groups_unban_member($user_id, $group_id)
{
global $bp;
if (!$bp->is_item_admin) {
return false;
}
$member = new BP_Groups_Member($user_id, $group_id);
do_action('groups_unban_member', $group_id, $user_id);
return $member->unban();
}
示例5: groups_unban_member
function groups_unban_member($user_id, $group_id)
{
global $bp;
/* Check the nonce first. */
if (!check_admin_referer('groups_unban_member')) {
return false;
}
if (!$bp->is_item_admin) {
return false;
}
$member = new BP_Groups_Member($user_id, $group_id);
do_action('groups_unban_member', $user_id, $group_id);
return $member->unban();
}
示例6: test_cache_should_be_invalidated_on_group_unban
/**
* @group cache
*/
public function test_cache_should_be_invalidated_on_group_unban()
{
$m1 = new BP_Groups_Member(self::$user, self::$groups[1]);
$m1->ban();
// Populate cache.
$g1 = bp_get_user_groups(self::$user);
$m2 = new BP_Groups_Member(self::$user, self::$groups[1]);
$m2->unban();
$expected = array(self::$groups[0], self::$groups[1]);
$found = bp_get_user_groups(self::$user);
$this->assertEqualSets($expected, array_keys($found));
}