当前位置: 首页>>代码示例>>PHP>>正文


PHP BP_Groups_Member::delete_all_for_user方法代码示例

本文整理汇总了PHP中BP_Groups_Member::delete_all_for_user方法的典型用法代码示例。如果您正苦于以下问题:PHP BP_Groups_Member::delete_all_for_user方法的具体用法?PHP BP_Groups_Member::delete_all_for_user怎么用?PHP BP_Groups_Member::delete_all_for_user使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BP_Groups_Member的用法示例。


在下文中一共展示了BP_Groups_Member::delete_all_for_user方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: groups_remove_data_for_user

/**
 * Delete all group membership information for the specified user.
 *
 * @since 1.0.0
 *
 * @param int $user_id ID of the user.
 */
function groups_remove_data_for_user($user_id)
{
    BP_Groups_Member::delete_all_for_user($user_id);
    /**
     * Fires after the deletion of all data for a user.
     *
     * @since 1.1.0
     *
     * @param int $user_id ID of the user whose data is being deleted.
     */
    do_action('groups_remove_data_for_user', $user_id);
}
开发者ID:jasonmcalpin,项目名称:BuddyPress,代码行数:19,代码来源:bp-groups-functions.php

示例2: groups_remove_data_for_user

/**
 * Delete all group membership information for the specified user.
 *
 * @since BuddyPress (1.0.0)
 *
 * @param int $user_id ID of the user.
 */
function groups_remove_data_for_user($user_id)
{
    BP_Groups_Member::delete_all_for_user($user_id);
    do_action('groups_remove_data_for_user', $user_id);
}
开发者ID:sdh100shaun,项目名称:pantheon,代码行数:12,代码来源:bp-groups-functions.php

示例3: groups_remove_data_for_user

function groups_remove_data_for_user($user_id)
{
    global $bp;
    BP_Groups_Member::delete_all_for_user($user_id);
    bp_core_delete_notifications_from_user($user_id, $bp->groups->id, 'new_membership_request');
    do_action('groups_remove_data_for_user', $user_id);
}
开发者ID:novichkovv,项目名称:candoweightloss,代码行数:7,代码来源:bp-groups-functions.php

示例4: wangguard_spam_all_data

function wangguard_spam_all_data($user_id)
{
    global $wpdb, $bp;
    $wpdb->query($wpdb->prepare("DELETE FROM {$bp->blogs->table_name} WHERE user_id = %d", $user_id));
    friends_remove_data($user_id);
    $group_ids = BP_Groups_Member::get_group_ids($user_id);
    foreach ($group_ids['groups'] as $group_id) {
        groups_update_groupmeta($group_id, 'total_member_count', groups_get_total_member_count($group_id) - 1);
        // If current user is the creator of a group and is the sole admin, delete that group to avoid counts going out-of-sync
        if (groups_is_user_admin($user_id, $group_id) && count(groups_get_group_admins($group_id)) < 2 && groups_is_user_creator($user_id, $group_id)) {
            groups_delete_group($group_id);
        }
    }
    return $wpdb->query($wpdb->prepare("DELETE FROM {$bp->groups->table_name_members} WHERE user_id = %d", $user_id));
    BP_Groups_Member::delete_all_for_user($user_id);
}
开发者ID:kd5ytx,项目名称:Empirical-Wordpress,代码行数:16,代码来源:wangguard-buddypress.php


注:本文中的BP_Groups_Member::delete_all_for_user方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。