本文整理汇总了PHP中groups_invite_user函数的典型用法代码示例。如果您正苦于以下问题:PHP groups_invite_user函数的具体用法?PHP groups_invite_user怎么用?PHP groups_invite_user使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了groups_invite_user函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: EnrolledCourse
public static function EnrolledCourse($student_id, $course_id, $status)
{
global $wpdb;
$group_id = get_post_meta($course_id, 'buddypress_id', true);
// Get BuddyPress
$bp = buddypress();
$group = $wpdb->get_row($wpdb->prepare("SELECT g.* FROM {$bp->groups->table_name} g WHERE g.id = %d", $group_id));
groups_invite_user(array('user_id' => $student_id, 'group_id' => $group_id, 'inviter_id' => $group->creator_id, 'date_modified' => bp_core_current_time(), 'is_confirmed' => 1));
$forums = bbp_get_group_forum_ids($group_id);
bbp_add_user_forum_subscription(bbp_get_current_user_id(), $forums[0]);
}
示例2: addUserFromCourseToGroup
public static function addUserFromCourseToGroup($courseId, $groupId)
{
global $wpdb;
if (get_current_user_id() != 30) {
return;
}
$bp = buddypress();
$group = $wpdb->get_row($wpdb->prepare("SELECT g.* FROM {$bp->groups->table_name} g WHERE g.id = %d", $groupId));
$userIdList = $wpdb->get_results($wpdb->prepare("SELECT user_id FROM `wp_namaste_student_courses` WHERE course_id=%d", $courseId));
foreach ($userIdList as $userId) {
groups_invite_user(array('user_id' => $userId->user_id, 'group_id' => $groupId, 'inviter_id' => $group->creator_id, 'date_modified' => bp_core_current_time(), 'is_confirmed' => 1));
$forums = bbp_get_group_forum_ids($groupId);
bbp_add_user_forum_subscription($userId, $forums[0]);
}
}
示例3: test_private_group_where_logged_in_user_has_not_requested_membership_but_has_been_invited
/**
* @group BP6319
*/
public function test_private_group_where_logged_in_user_has_not_requested_membership_but_has_been_invited()
{
$users = $this->factory->user->create_many(2);
$g = $this->factory->group->create(array('status' => 'private'));
$this->set_current_user($users[0]);
groups_invite_user(array('user_id' => $users[0], 'group_id' => $g, 'inviter_id' => $users[1]));
if (bp_has_groups(array('include' => array($g)))) {
while (bp_groups()) {
bp_the_group();
$found = get_echo('bp_group_status_message');
}
}
$expected = __('This is a private group and you must request group membership in order to join.', 'buddypress');
$this->assertSame($expected, $found);
}
示例4: groups_ajax_invite_user
function groups_ajax_invite_user()
{
global $bp;
check_ajax_referer('groups_invite_uninvite_user');
if (!$_POST['friend_id'] || !$_POST['friend_action'] || !$_POST['group_id']) {
return false;
}
if (!groups_is_user_admin($bp->loggedin_user->id, $_POST['group_id'])) {
return false;
}
if (!friends_check_friendship($bp->loggedin_user->id, $_POST['friend_id'])) {
return false;
}
if ('invite' == $_POST['friend_action']) {
if (!groups_invite_user($_POST['friend_id'], $_POST['group_id'])) {
return false;
}
$user = new BP_Core_User($_POST['friend_id']);
echo '<li id="uid-' . $user->id . '">';
echo attribute_escape($user->avatar_thumb);
echo '<h4>' . attribute_escape($user->user_link) . '</h4>';
echo '<span class="activity">' . attribute_escape($user->last_active) . '</span>';
echo '<div class="action">
<a class="remove" href="' . wp_nonce_url($bp->loggedin_user->domain . $bp->groups->slug . '/' . $_POST['group_id'] . '/invites/remove/' . $user->id, 'groups_invite_uninvite_user') . '" id="uid-' . attribute_escape($user->id) . '">' . __('Remove Invite', 'buddypress') . '</a>
</div>';
echo '</li>';
} else {
if ('uninvite' == $_POST['friend_action']) {
if (!groups_uninvite_user($_POST['friend_id'], $_POST['group_id'])) {
return false;
}
return true;
} else {
return false;
}
}
}
示例5: bp_legacy_theme_ajax_invite_user
/**
* Invites a friend to join a group via a POST request.
*
* @since BuddyPress (1.2)
* @todo Audit return types
*/
function bp_legacy_theme_ajax_invite_user()
{
// Bail if not a POST action
if ('POST' !== strtoupper($_SERVER['REQUEST_METHOD'])) {
return;
}
check_ajax_referer('groups_invite_uninvite_user');
if (!$_POST['friend_id'] || !$_POST['friend_action'] || !$_POST['group_id']) {
return;
}
if (!bp_groups_user_can_send_invites($_POST['group_id'])) {
return;
}
if (!friends_check_friendship(bp_loggedin_user_id(), $_POST['friend_id'])) {
return;
}
$group_id = (int) $_POST['group_id'];
$friend_id = (int) $_POST['friend_id'];
if ('invite' == $_POST['friend_action']) {
$group = groups_get_group($group_id);
// Users who have previously requested membership do not need
// another invitation created for them
if (BP_Groups_Member::check_for_membership_request($friend_id, $group_id)) {
$user_status = 'is_pending';
// Create the user invitation
} elseif (groups_invite_user(array('user_id' => $friend_id, 'group_id' => $group_id))) {
$user_status = 'is_invited';
// Miscellaneous failure
} else {
return;
}
$user = new BP_Core_User($friend_id);
$uninvite_url = bp_is_current_action('create') ? bp_get_groups_directory_permalink() . 'create/step/group-invites/?user_id=' . $friend_id : bp_get_group_permalink($group) . 'send-invites/remove/' . $friend_id;
echo '<li id="uid-' . esc_attr($user->id) . '">';
echo $user->avatar_thumb;
echo '<h4>' . $user->user_link . '</h4>';
echo '<span class="activity">' . esc_attr($user->last_active) . '</span>';
echo '<div class="action">
<a class="button remove" href="' . wp_nonce_url($uninvite_url, 'groups_invite_uninvite_user') . '" id="uid-' . esc_attr($user->id) . '">' . __('Remove Invite', 'buddypress') . '</a>
</div>';
if ('is_pending' == $user_status) {
echo '<p class="description">' . sprintf(__('%s has previously requested to join this group. Sending an invitation will automatically add the member to the group.', 'buddypress'), $user->user_link) . '</p>';
}
echo '</li>';
exit;
} elseif ('uninvite' == $_POST['friend_action']) {
// Users who have previously requested membership should not
// have their requests deleted on the "uninvite" action
if (BP_Groups_Member::check_for_membership_request($friend_id, $group_id)) {
return;
}
// Remove the unsent invitation
if (!groups_uninvite_user($friend_id, $group_id)) {
return;
}
exit;
} else {
return;
}
}
示例6: bp_dtheme_ajax_invite_user
/**
* Invites a friend to join a group via a POST request.
*
* @return unknown
* @since BuddyPress (1.2)
* @todo Audit return types
*/
function bp_dtheme_ajax_invite_user()
{
// Bail if not a POST action
if ('POST' !== strtoupper($_SERVER['REQUEST_METHOD'])) {
return;
}
check_ajax_referer('groups_invite_uninvite_user');
if (!$_POST['friend_id'] || !$_POST['friend_action'] || !$_POST['group_id']) {
return;
}
if (!bp_groups_user_can_send_invites($_POST['group_id'])) {
return;
}
if (!friends_check_friendship(bp_loggedin_user_id(), $_POST['friend_id'])) {
return;
}
if ('invite' == $_POST['friend_action']) {
if (!groups_invite_user(array('user_id' => $_POST['friend_id'], 'group_id' => $_POST['group_id']))) {
return;
}
$user = new BP_Core_User($_POST['friend_id']);
echo '<li id="uid-' . $user->id . '">';
echo $user->avatar_thumb;
echo '<h4>' . $user->user_link . '</h4>';
echo '<span class="activity">' . esc_attr($user->last_active) . '</span>';
echo '<div class="action">
<a class="button remove" href="' . wp_nonce_url(bp_loggedin_user_domain() . bp_get_groups_slug() . '/' . $_POST['group_id'] . '/invites/remove/' . $user->id, 'groups_invite_uninvite_user') . '" id="uid-' . esc_attr($user->id) . '">' . __('Remove Invite', 'logicalboneshug') . '</a>
</div>';
echo '</li>';
exit;
} elseif ('uninvite' == $_POST['friend_action']) {
if (!groups_uninvite_user($_POST['friend_id'], $_POST['group_id'])) {
return;
}
exit;
} else {
return;
}
}
示例7: groups_screen_group_invite
/**
* Handle the display of a group's Send Invites page.
*/
function groups_screen_group_invite()
{
if (!bp_is_single_item()) {
return false;
}
$bp = buddypress();
if (bp_is_action_variable('send', 0)) {
if (!check_admin_referer('groups_send_invites', '_wpnonce_send_invites')) {
return false;
}
if (!empty($_POST['friends'])) {
foreach ((array) $_POST['friends'] as $friend) {
groups_invite_user(array('user_id' => $friend, 'group_id' => $bp->groups->current_group->id));
}
}
// Send the invites.
groups_send_invites(bp_loggedin_user_id(), $bp->groups->current_group->id);
bp_core_add_message(__('Group invites sent.', 'buddypress'));
/**
* Fires after the sending of a group invite inside the group's Send Invites page.
*
* @since 1.0.0
*
* @param int $id ID of the group whose members are being displayed.
*/
do_action('groups_screen_group_invite', $bp->groups->current_group->id);
bp_core_redirect(bp_get_group_permalink($bp->groups->current_group));
} elseif (!bp_action_variable(0)) {
/**
* Filters the template to load for a group's Send Invites page.
*
* @since 1.0.0
*
* @param string $value Path to a group's Send Invites template.
*/
bp_core_load_template(apply_filters('groups_template_group_invite', 'groups/single/home'));
} else {
bp_do_404();
}
}
示例8: invite_anyone_activate_user
function invite_anyone_activate_user($user_id, $key, $user)
{
global $bp;
$email = bp_core_get_user_email($user_id);
$inviters = array();
// Fire the query
$invites = invite_anyone_get_invitations_by_invited_email($email);
if ($invites->have_posts()) {
// From the posts returned by the query, get a list of unique inviters
$groups = array();
while ($invites->have_posts()) {
$invites->the_post();
$inviter_id = get_the_author_meta('ID');
$inviters[] = $inviter_id;
$groups_data = wp_get_post_terms(get_the_ID(), invite_anyone_get_invited_groups_tax_name());
foreach ($groups_data as $group_data) {
if (!isset($groups[$group_data->name])) {
// Keyed by inviter, which means they'll only get one invite per group
$groups[$group_data->name] = $inviter_id;
}
}
// Mark as accepted
update_post_meta(get_the_ID(), 'bp_ia_accepted', date('Y-m-d H:i:s'));
}
$inviters = array_unique($inviters);
// Friendship requests
if (bp_is_active('friends') && apply_filters('invite_anyone_send_friend_requests_on_acceptance', true)) {
if (function_exists('friends_add_friend')) {
foreach ($inviters as $inviter) {
friends_add_friend($inviter, $user_id);
}
}
}
// BuddyPress Followers support
if (function_exists('bp_follow_start_following') && apply_filters('invite_anyone_send_follow_requests_on_acceptance', true)) {
foreach ($inviters as $inviter) {
bp_follow_start_following(array('leader_id' => $user_id, 'follower_id' => $inviter));
bp_follow_start_following(array('leader_id' => $inviter, 'follower_id' => $user_id));
}
}
// Group invitations
if (bp_is_active('groups')) {
foreach ($groups as $group_id => $inviter_id) {
$args = array('user_id' => $user_id, 'group_id' => $group_id, 'inviter_id' => $inviter_id);
groups_invite_user($args);
groups_send_invites($inviter_id, $group_id);
}
}
}
do_action('accepted_email_invite', $user_id, $inviters);
}
示例9: test_groups_is_user_pending_should_return_false_for_pending_member
public function test_groups_is_user_pending_should_return_false_for_pending_member()
{
groups_invite_user(array('user_id' => self::$user, 'group_id' => self::$groups[1], 'inviter_id' => 123));
// Send invite.
$m = new BP_Groups_Member(self::$user, self::$groups[1]);
$m->invite_sent = 1;
$m->save();
$this->assertEquals(false, groups_is_user_pending(self::$user, self::$groups[1]));
}
示例10: groups_action_create_group
/**
* Catch and process group creation form submissions.
*/
function groups_action_create_group()
{
global $bp;
// If we're not at domain.org/groups/create/ then return false
if (!bp_is_groups_component() || !bp_is_current_action('create')) {
return false;
}
if (!is_user_logged_in()) {
return false;
}
if (!bp_user_can_create_groups()) {
bp_core_add_message(__('Sorry, you are not allowed to create groups.', 'buddypress'), 'error');
bp_core_redirect(trailingslashit(bp_get_root_domain() . '/' . bp_get_groups_root_slug()));
}
// Make sure creation steps are in the right order
groups_action_sort_creation_steps();
// If no current step is set, reset everything so we can start a fresh group creation
$bp->groups->current_create_step = bp_action_variable(1);
if (!bp_get_groups_current_create_step()) {
unset($bp->groups->current_create_step);
unset($bp->groups->completed_create_steps);
setcookie('bp_new_group_id', false, time() - 1000, COOKIEPATH);
setcookie('bp_completed_create_steps', false, time() - 1000, COOKIEPATH);
$reset_steps = true;
$keys = array_keys($bp->groups->group_creation_steps);
bp_core_redirect(bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . array_shift($keys) . '/');
}
// If this is a creation step that is not recognized, just redirect them back to the first screen
if (bp_get_groups_current_create_step() && empty($bp->groups->group_creation_steps[bp_get_groups_current_create_step()])) {
bp_core_add_message(__('There was an error saving group details. Please try again.', 'buddypress'), 'error');
bp_core_redirect(bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/');
}
// Fetch the currently completed steps variable
if (isset($_COOKIE['bp_completed_create_steps']) && !isset($reset_steps)) {
$bp->groups->completed_create_steps = json_decode(base64_decode(stripslashes($_COOKIE['bp_completed_create_steps'])));
}
// Set the ID of the new group, if it has already been created in a previous step
if (isset($_COOKIE['bp_new_group_id'])) {
$bp->groups->new_group_id = (int) $_COOKIE['bp_new_group_id'];
$bp->groups->current_group = groups_get_group(array('group_id' => $bp->groups->new_group_id));
// Only allow the group creator to continue to edit the new group
if (!bp_is_group_creator($bp->groups->current_group, bp_loggedin_user_id())) {
bp_core_add_message(__('Only the group creator may continue editing this group.', 'buddypress'), 'error');
bp_core_redirect(bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/');
}
}
// If the save, upload or skip button is hit, lets calculate what we need to save
if (isset($_POST['save'])) {
// Check the nonce
check_admin_referer('groups_create_save_' . bp_get_groups_current_create_step());
if ('group-details' == bp_get_groups_current_create_step()) {
if (empty($_POST['group-name']) || empty($_POST['group-desc']) || !strlen(trim($_POST['group-name'])) || !strlen(trim($_POST['group-desc']))) {
bp_core_add_message(__('Please fill in all of the required fields', 'buddypress'), 'error');
bp_core_redirect(bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . bp_get_groups_current_create_step() . '/');
}
$new_group_id = isset($bp->groups->new_group_id) ? $bp->groups->new_group_id : 0;
if (!($bp->groups->new_group_id = groups_create_group(array('group_id' => $new_group_id, 'name' => $_POST['group-name'], 'description' => $_POST['group-desc'], 'slug' => groups_check_slug(sanitize_title(esc_attr($_POST['group-name']))), 'date_created' => bp_core_current_time(), 'status' => 'public')))) {
bp_core_add_message(__('There was an error saving group details, please try again.', 'buddypress'), 'error');
bp_core_redirect(bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . bp_get_groups_current_create_step() . '/');
}
}
if ('group-settings' == bp_get_groups_current_create_step()) {
$group_status = 'public';
$group_enable_forum = 1;
if (!isset($_POST['group-show-forum'])) {
$group_enable_forum = 0;
} else {
// Create the forum if enable_forum = 1
if (bp_is_active('forums') && !groups_get_groupmeta($bp->groups->new_group_id, 'forum_id')) {
groups_new_group_forum();
}
}
if ('private' == $_POST['group-status']) {
$group_status = 'private';
} else {
if ('hidden' == $_POST['group-status']) {
$group_status = 'hidden';
}
}
if (!($bp->groups->new_group_id = groups_create_group(array('group_id' => $bp->groups->new_group_id, 'status' => $group_status, 'enable_forum' => $group_enable_forum)))) {
bp_core_add_message(__('There was an error saving group details, please try again.', 'buddypress'), 'error');
bp_core_redirect(bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . bp_get_groups_current_create_step() . '/');
}
// Set the invite status
// Checked against a whitelist for security
$allowed_invite_status = apply_filters('groups_allowed_invite_status', array('members', 'mods', 'admins'));
$invite_status = !empty($_POST['group-invite-status']) && in_array($_POST['group-invite-status'], (array) $allowed_invite_status) ? $_POST['group-invite-status'] : 'members';
groups_update_groupmeta($bp->groups->new_group_id, 'invite_status', $invite_status);
}
if ('group-invites' === bp_get_groups_current_create_step()) {
if (!empty($_POST['friends'])) {
foreach ((array) $_POST['friends'] as $friend) {
groups_invite_user(array('user_id' => $friend, 'group_id' => $bp->groups->new_group_id));
}
}
groups_send_invites(bp_loggedin_user_id(), $bp->groups->new_group_id);
}
//.........这里部分代码省略.........
示例11: groups_screen_group_invite
/**
* Handle the display of a group's Send Invites page.
*/
function groups_screen_group_invite()
{
if (!bp_is_single_item()) {
return false;
}
$bp = buddypress();
if (bp_is_action_variable('send', 0)) {
if (!check_admin_referer('groups_send_invites', '_wpnonce_send_invites')) {
return false;
}
if (!empty($_POST['friends'])) {
foreach ((array) $_POST['friends'] as $friend) {
groups_invite_user(array('user_id' => $friend, 'group_id' => $bp->groups->current_group->id));
}
}
// Send the invites.
groups_send_invites(bp_loggedin_user_id(), $bp->groups->current_group->id);
bp_core_add_message(__('Group invites sent.', 'buddypress'));
do_action('groups_screen_group_invite', $bp->groups->current_group->id);
bp_core_redirect(bp_get_group_permalink($bp->groups->current_group));
} elseif (!bp_action_variable(0)) {
// Show send invite page
bp_core_load_template(apply_filters('groups_template_group_invite', 'groups/single/home'));
} else {
bp_do_404();
}
}
示例12: invite_anyone_ajax_invite_user
function invite_anyone_ajax_invite_user()
{
global $bp;
check_ajax_referer('groups_invite_uninvite_user');
if (!$_POST['friend_id'] || !$_POST['friend_action'] || !$_POST['group_id']) {
return false;
}
if ('invite' == $_POST['friend_action']) {
if (!groups_invite_user(array('user_id' => $_POST['friend_id'], 'group_id' => $_POST['group_id']))) {
return false;
}
$user = new BP_Core_User($_POST['friend_id']);
$group_slug = isset($bp->groups->root_slug) ? $bp->groups->root_slug : $bp->groups->slug;
if (bp_is_current_action('create')) {
$uninvite_url = bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/group-invites/?user_id=' . $user->id;
} else {
$uninvite_url = bp_get_group_permalink(groups_get_current_group()) . 'send-invites/remove/' . $user->id;
}
echo '<li id="uid-' . $user->id . '">';
echo bp_core_fetch_avatar(array('item_id' => $user->id));
echo '<h4>' . bp_core_get_userlink($user->id) . '</h4>';
echo '<span class="activity">' . esc_html($user->last_active) . '</span>';
echo '<div class="action">
<a class="remove" href="' . wp_nonce_url($uninvite_url) . '" id="uid-' . esc_html($user->id) . '">' . __('Remove Invite', 'buddypress') . '</a>
</div>';
echo '</li>';
} else {
if ('uninvite' == $_POST['friend_action']) {
groups_uninvite_user($_POST['friend_id'], $_POST['group_id']);
}
}
die;
}
示例13: test_get_invite_count_for_user
/**
* @group counts
*/
public function test_get_invite_count_for_user()
{
$u1 = $this->factory->user->create();
$u2 = $this->factory->user->create();
$g = $this->factory->group->create(array('creator_id' => $u1));
// create invitation
groups_invite_user(array('user_id' => $u2, 'group_id' => $g, 'inviter_id' => $u1));
// send the invite
// this function is imperative to set the 'invite_sent' flag in the DB
// why is this separated from groups_invite_user()?
// @see groups_screen_group_invite()
groups_send_invites($u1, $g);
// assert invite count
$this->assertEquals(1, groups_get_invite_count_for_user($u2));
// accept the invite and reassert
groups_accept_invite($u2, $g);
$this->assertEquals(0, groups_get_invite_count_for_user($u2));
}
示例14: user_activated
/**
* The main workhorse where the friends, groups and welcome message features happens.
* Triggers when a user account is activated.
*
* @param int $user_id ID of the new user
* @since 3.0
*/
function user_activated($user_id)
{
$settings = DP_Welcome_Pack::get_settings();
// Is the Friend invitations component enabled?
if (!empty($settings['dpw_friendstoggle']) && bp_is_active('friends') && !empty($settings['friends'])) {
// Send friend requests
foreach ((array) $settings['friends'] as $friend_id) {
friends_add_friend((int) $friend_id, $user_id, constant('WELCOME_PACK_AUTOACCEPT_INVITATIONS'));
}
}
// Is the Group invitations component enabled?
if (!empty($settings['dpw_groupstoggle']) && bp_is_active('groups') && !empty($settings['groups'])) {
foreach ((array) $settings['groups'] as $group_id) {
$group = new BP_Groups_Group((int) $group_id);
// Send group invites
groups_invite_user(array('user_id' => $user_id, 'group_id' => (int) $group_id, 'inviter_id' => $group->creator_id, 'is_confirmed' => constant('WELCOME_PACK_AUTOACCEPT_INVITATIONS')));
groups_send_invites($group->creator_id, (int) $group_id);
}
}
// Is the Welcome Message component enabled?
if (!empty($settings['dpw_welcomemsgtoggle']) && bp_is_active('messages') && !empty($settings['welcomemsgsender']) && !empty($settings['welcomemsgsubject']) && !empty($settings['welcomemsg'])) {
messages_new_message(array('sender_id' => $settings['welcomemsgsender'], 'recipients' => $user_id, 'subject' => apply_filters('dpw_keyword_replacement', $settings['welcomemsgsubject'], $user_id), 'content' => apply_filters('dpw_keyword_replacement', $settings['welcomemsg'], $user_id)));
}
// Call an action for third-parties to hook into
do_action('dpw_user_activated', $user_id);
}
示例15: test_membership_request_notifications_should_be_cleared_when_request_is_accepted
/**
* @group BP7375
*/
public function test_membership_request_notifications_should_be_cleared_when_request_is_accepted()
{
$users = $this->factory->user->create_many(3);
$this->add_user_to_group($users[0], $this->group, array('is_admin' => 1));
$this->add_user_to_group($users[1], $this->group, array('is_admin' => 1));
groups_send_membership_request($users[2], $this->group);
// Both admins should get a notification.
$get_args = array('user_id' => $users[0], 'item_id' => $this->group, 'secondary_item_id' => $users[2], 'component_action' => 'new_membership_request', 'is_new' => true);
$u0_notifications = BP_Notifications_Notification::get($get_args);
$u1_notifications = BP_Notifications_Notification::get($get_args);
$this->assertNotEmpty($u0_notifications);
$this->assertNotEmpty($u1_notifications);
$this->assertTrue(groups_invite_user(array('user_id' => $users[2], 'group_id' => $this->group)));
$u0_notifications = BP_Notifications_Notification::get($get_args);
$u1_notifications = BP_Notifications_Notification::get($get_args);
$this->assertEmpty($u0_notifications);
$this->assertEmpty($u1_notifications);
}