Ejemplo n.º 1
0
function bp_has_friends_to_invite($group = false)
{
    global $groups_template, $bp;
    if (!bp_is_active('friends')) {
        return false;
    }
    if (!$group) {
        $group =& $groups_template->group;
    }
    if (!friends_check_user_has_friends($bp->loggedin_user->id) || !friends_count_invitable_friends($bp->loggedin_user->id, $group->id)) {
        return false;
    }
    return true;
}
function bp_has_friends_to_invite($group = false)
{
    global $groups_template;
    if (!bp_is_active('friends')) {
        return false;
    }
    if (empty($group)) {
        $group =& $groups_template->group;
    }
    if (!friends_check_user_has_friends(bp_loggedin_user_id()) || !friends_count_invitable_friends(bp_loggedin_user_id(), $group->id)) {
        return false;
    }
    return true;
}
Ejemplo n.º 3
0
function bp_has_friends_to_invite( $group = false ) {
	global $groups_template, $bp;

	if ( !function_exists('friends_install') )
		return false;

	if ( !$group )
		$group =& $groups_template->group;

	if ( !friends_check_user_has_friends( $bp->loggedin_user->id ) || !friends_count_invitable_friends( $bp->loggedin_user->id, $group->id ) )
		return false;

	return true;
}