Lucky code number for lottery.Enjoy Free 888+200 Daily Legal Bonus https://www.ads-software.com/support/plugin/invite-anyone/feed Tue, 22 Oct 2024 17:34:02 +0000 https://bbpress.org/?v=2.7.0-alpha-2 en-US https://www.ads-software.com/support/topic/avoid-breaking-the-surrounding-boxes/ <![CDATA[Avoid breaking the surrounding boxes]]> https://www.ads-software.com/support/topic/avoid-breaking-the-surrounding-boxes/ Sun, 06 Oct 2024 13:47:53 +0000 locker17 Replies: 0

Hello,

the user can set his invitations in a separate tab under settings.
This is styled by old fashioned table cells which run out of my window on mobile. I have the same problem with the original buddypress invitation form.
Where can I modify this template – maybe switch the table to divs – to make it responsive?

Thanks for help in advance!

]]>
https://www.ads-software.com/support/topic/massive-number-of-php-warnings-after-update-to-php-8-1/ <![CDATA[<span id="1gwpiim" class="resolved" aria-label="Resolved" title="Topic is resolved."></span>Massive number of PHP Warnings after update to PHP 8.1]]> https://www.ads-software.com/support/topic/massive-number-of-php-warnings-after-update-to-php-8-1/ Mon, 30 Sep 2024 20:45:50 +0000 hemligg Replies: 1

After we upgraded our site to PHP 8.1 from 8.0 we started to get a massive number of PHP Warnings in our error logs:
“PHP Warning: Undefined array key “email_role” in /home/runcloud/webapps/OurSite/wp-content/plugins/invite-anyone/by-email/by-email.php on line 422″

So I had to change the function invite_anyone_access_test() to this:

function invite_anyone_access_test() {
global $current_user, $bp;

$access_allowed = true;
$iaoptions      = invite_anyone_options();

if ( ! is_user_logged_in() ) {
    $access_allowed = false;
} elseif ( current_user_can( 'bp_moderate' ) ) {
    // The site admin can see all
    $access_allowed = true;
} elseif ( bp_displayed_user_id() && ! bp_is_my_profile() ) {
    $access_allowed = false;
} elseif ( isset( $iaoptions['email_visibility_toggle'] ) && 'no_limit' === $iaoptions['email_visibility_toggle'] ) {
    // This is the last of the general checks: logged in,
    // looking at own profile, and finally admin has set to "All Users".
    $access_allowed = true;
} elseif ( isset( $iaoptions['email_since_toggle'] ) && 'yes' === $iaoptions['email_since_toggle'] ) {
    // Minimum number of days since joined the site
    $since = isset( $iaoptions['days_since'] ) ? $iaoptions['days_since'] : 0;
    if ( $since ) {
        // WordPress's DAY_IN_SECONDS exists for WP >= 3.5, target version is 3.2, hence hard-coded value of 86400.
        $since = $since * 86400;

        $date_registered = strtotime( $current_user->data->user_registered );
        $time            = time();

        if ( $time - $date_registered < $since ) {
            $access_allowed = false;
        }
    }
} elseif ( isset( $iaoptions['email_role_toggle'] ) && 'yes' === $iaoptions['email_role_toggle'] ) {
    // Check if 'email_role' is set before accessing it.
    if ( isset( $iaoptions['email_role'] ) && ! empty( $iaoptions['email_role'] ) ) {
        $role = $iaoptions['email_role'];

        // Minimum role on this blog. Users who are at the necessary role or higher
        // should move right through this toward the 'return true' at the end of the function.
        if ( isset( $iaoptions['minimum_role'] ) && $role ) {
            switch ( $role ) {
                case 'Subscriber' :
                    if ( ! current_user_can( 'read' ) ) {
                        $access_allowed = false;
                    }
                    break;

                case 'Contributor' :
                    if ( ! current_user_can( 'edit_posts' ) ) {
                        $access_allowed = false;
                    }
                    break;

                case 'Author' :
                    if ( ! current_user_can( 'publish_posts' ) ) {
                        $access_allowed = false;
                    }
                    break;

                case 'Editor' :
                    if ( ! current_user_can( 'delete_others_pages' ) ) {
                        $access_allowed = false;
                    }
                    break;

                case 'Administrator' :
                    if ( ! current_user_can( 'switch_themes' ) ) {
                        $access_allowed = false;
                    }
                    break;
            }//end switch
        }//end if
    }
} // <== This closing bracket was missing
elseif ( isset( $iaoptions['email_blacklist_toggle'] ) && 'yes' === $iaoptions['email_blacklist_toggle'] ) {
    // User blacklist.
    if ( isset( $iaoptions['email_blacklist'] ) ) {
        $blacklist = wp_parse_id_list( $iaoptions['email_blacklist'] );
        $user_id   = intval( $current_user->ID );
        if ( in_array( $user_id, $blacklist, true ) ) {
            $access_allowed = false;
        }
    }
}

return apply_filters( 'invite_anyone_access_test', $access_allowed );

}

It would be great if you could handle this issue in a coming release.

]]>
https://www.ads-software.com/support/topic/template-modifications-2/ <![CDATA[Template modifications]]> https://www.ads-software.com/support/topic/template-modifications-2/ Mon, 23 Sep 2024 09:40:03 +0000 George Replies: 1

Is there a way to modify the plugin core templates similar to how BuddyPress template overrides occur?

]]>
https://www.ads-software.com/support/topic/critical-error-php-parse-error-syntax-error-unexpected-if-t_if/ <![CDATA[Critical Error, PHP Parse error: syntax error, unexpected ‘if’ (T_IF)]]> https://www.ads-software.com/support/topic/critical-error-php-parse-error-syntax-error-unexpected-if-t_if/ Sun, 07 Jul 2024 04:46:05 +0000 sackerly Replies: 0

The plugin seems to be triggering a critical error, the error log file says:

[07-Jul-2024 02:48:41 UTC] PHP Parse error: syntax error, unexpected ‘if’ (T_IF) in /home/rockymou/forums.rmerc.org/wp-content/themes/buddyboss-theme/buddypress/groups/single/invite-anyone.php on line 22

Any thoughts on what might be causing this? Thanks!

]]>
https://www.ads-software.com/support/topic/deprecated-use-of-the-buddypress-groups_send_invites-function/ <![CDATA[Deprecated use of the BuddyPress groups_send_invites function]]> https://www.ads-software.com/support/topic/deprecated-use-of-the-buddypress-groups_send_invites-function/ Wed, 12 Jun 2024 16:57:55 +0000 monkeystyping Replies: 0

I’m getting a deprecated message in my logs:

[12-Jun-2024 14:49:35 UTC] PHP Deprecated:? Function groups_send_invites was called with an argument that is deprecated since version 5.0.0! Arguments passed to groups_send_invites should be in an associative array. See the inline documentation at /var/www/html/wp-content/plugins/buddypress/bp-groups/bp-groups-functions.php for more details. in /var/www/html/wp-includes/functions.php on line 6078

You are sending user id and group id as comma-separated parems. Newest BuddyPress is saying that params passed should be in an array. See wp-content/plugins/buddypress/bp-groups/bp-groups-functions.php, lines 1831-1844.

This isn’t urgent, of course. It’s only “deprecated”. Please update your plugin when possible.

Thanks!

]]>
https://www.ads-software.com/support/topic/php-parse-error-during-group-creation/ <![CDATA[PHP Parse Error During Group Creation]]> https://www.ads-software.com/support/topic/php-parse-error-during-group-creation/ Tue, 04 Jun 2024 23:09:57 +0000 michawerneke1212 Replies: 0

Dear Plugin Development Team,

I am encountering a PHP parse error during the buddyboss group creation process. The error message is as follows:

PHP Parse error:  syntax error, unexpected token "if" in (...)buddypress/groups/single/invite-anyone.php on line 22

The issue arises because the if statement is outside the PHP tags. Here is my proposed solution to fix the syntax error:

<?php do_action( 'bp_before_group_send_invites_content' ); ?>

<?php if ( ! bp_get_new_group_id() ) { ?>
    <form action="<?php invite_anyone_group_invite_form_action(); ?>" method="post" id="send-invite-form">
<?php } ?>

<div class="left-menu">
    <h4 class="total-members-text">Members</h4>
    <ul class="first acfb-holder">
        <li>
            <input type="text" name="send-to-input" class="send-to-input" id="send-to-input" placeholder="<?php esc_html_e("Search members", 'buddyboss-theme'); ?>" />
        </li>
    </ul>

    <?php
    wp_nonce_field( 'groups_invite_uninvite_user', '_wpnonce_invite_uninvite_user' );

    if ( ! invite_anyone_is_large_network( 'users' ) ) { ?>
        <div class="bb-select-members-text"><strong><?php esc_html_e( 'Select members:', 'buddyboss-theme' ); ?></strong></div>

        <div id="invite-anyone-member-list">
            <ul>
                <?php bp_new_group_invite_member_list(); ?>
            </ul>
        </div>
    <?php } ?>
</div>

Please update the plugin to incorporate this fix to prevent this error from occurring during the group creation process.

Thank you for your attention to this matter. I look forward to your response and the updated version of the plugin.

Best regards,
Micha

]]>
https://www.ads-software.com/support/topic/referral-possible/ <![CDATA[Referral possible?]]> https://www.ads-software.com/support/topic/referral-possible/ Tue, 13 Feb 2024 19:25:45 +0000 melaniesinmek Replies: 0

Hi,

just wondering if it was possible to see when a new user registers, if that person was referred to/invited by an already existing member of the website and which member of course.

This way I could give out vouchers for fulfilled referral.

Thanks ??

]]>
https://www.ads-software.com/support/topic/cant-clear-all-accepted/ <![CDATA[Can’t clear all accepted]]> https://www.ads-software.com/support/topic/cant-clear-all-accepted/ Fri, 02 Feb 2024 10:27:45 +0000 hemligg Replies: 4

We have been using this plugin for a few years and have about 50K invitations stored. But we would like to clear all accepted invitations. When we click on the link “/invite-anyone/sent-invites/?clear=accepted” then only a couple of invitations are deleted each time. I can’t find any error message. Why is that? And how can I deleted all accepted invitations? Is there any work around? Can I run a database query to delete them manually? Run a code snippet to make it go through all 50K invitations and delete the accepted ones?

  • This topic was modified 8 months, 3 weeks ago by hemligg.
]]>
https://www.ads-software.com/support/topic/mail-doesnt-get-sent/ <![CDATA[<span id="1gwpiim" class="resolved" aria-label="Resolved" title="Topic is resolved."></span>Mail doesn’t get sent]]> https://www.ads-software.com/support/topic/mail-doesnt-get-sent/ Mon, 25 Dec 2023 14:09:08 +0000 bba01 Replies: 1

Hi and thank you for a great plugin!

In some time, I don’t know for how long, the invite e-mail doesn’t get sent away. I’m using FluentSMTP and use the E-mail log feature. Other mails are sent but not the ones from Invite Anyone. When I check in the backend the invitation is created in the Invite Anyone tab in the BuddyBoss user profile and also in BuddyPress Invitations in the backend everything seems fine. But still, no mail i sent. Can you please help me to solve this issue?

/bb

]]>
https://www.ads-software.com/support/topic/404page-not-found-error-when-receiving-group-invitation-on-email-notification/ <![CDATA[404(Page not Found Error) when receiving group invitation on Email/Notification]]> https://www.ads-software.com/support/topic/404page-not-found-error-when-receiving-group-invitation-on-email-notification/ Thu, 16 Nov 2023 13:59:14 +0000 decato Replies: 0

Fix : For this Error, You have to enable “Friend network” in Buddypress settings.
Hope this works

Thanks, Have a good day ??

]]>
https://www.ads-software.com/support/topic/is-it-possible-to-see-who-was-invited/ <![CDATA[Is it possible to see who was invited?]]> https://www.ads-software.com/support/topic/is-it-possible-to-see-who-was-invited/ Thu, 12 Oct 2023 14:37:16 +0000 chrishechler Replies: 0

Hi,

I like the idea behind this plugin.

Is there a chance to actually see who was invited via the plugin? (Not necessarily who invited someone but who actually was)

So, if someone on a BuddyBoss social website invites a friend, is it possible for ADMIN to see who was invited once the friend then becomes a member of the website?

Especially among the newly registered members it would be interesting to see how many come via the plugin.

Thank you ??

]]>
https://www.ads-software.com/support/topic/unnecessary-friend-requests/ <![CDATA[Unnecessary Friend Requests]]> https://www.ads-software.com/support/topic/unnecessary-friend-requests/ Thu, 17 Aug 2023 22:13:49 +0000 scarlettr8 Replies: 0

When using ‘Send invite by email’ associated with a group—after user activates and accepts, they receive a Friend Request email for EVERY member of the group. This is really unnecessary, how do I get rid of this function?

]]>
https://www.ads-software.com/support/topic/how-to-create-html-email-template-for-send-invites/ <![CDATA[How to create HTML email template for Send Invites]]> https://www.ads-software.com/support/topic/how-to-create-html-email-template-for-send-invites/ Mon, 17 Jul 2023 01:48:47 +0000 FirstFruitsMedia Replies: 0

Hi,

I would like to make template for the Main text of email invitation message in Settings -> Invite Anyone to be HTML and not just plain text.

How do I use the Buddypress invitations nice page that I create with HTML as the template that is used when a user sends invites from their profile?

Thanks,

Sway

]]>
https://www.ads-software.com/support/topic/group-invite-link-problem/ <![CDATA[Group Invite Link problem]]> https://www.ads-software.com/support/topic/group-invite-link-problem/ Sat, 17 Jun 2023 12:47:39 +0000 arjun02patel Replies: 0

So when i login as a member, i can see that i have invitation to the group. but when i click on it then,

it takes me to the contact page of the website. i checked there is not any redirection placed on the site for this url

Invite link :https://playground.operaontap.org/members/testy2/groups/invites/?n=1

]]>
https://www.ads-software.com/support/topic/emails-are-not-sending-11/ <![CDATA[Emails are not sending]]> https://www.ads-software.com/support/topic/emails-are-not-sending-11/ Fri, 07 Apr 2023 19:33:38 +0000 veneshabrooks Replies: 0

Hi there,

I tried sending invites and test to see if I received the emails, but I did not receive anything. I have also uploaded the WP SMTP plugin and still it did not work. I tested to see if the WP SMTP was working and it did send emails. So the WP SMTP works. However, sending emails invites via the your plugin does not work. Can you help me?

Venesha

]]>
https://www.ads-software.com/support/topic/wp-mail-stmp-no-html-mails/ <![CDATA[WP Mail STMP no HTML Mails]]> https://www.ads-software.com/support/topic/wp-mail-stmp-no-html-mails/ Mon, 20 Mar 2023 13:51:34 +0000 uponity Replies: 0

Hello,
we use WP Mail SMTP for Mails. After we make with this Code Snippet Buddypress working with WP Mail SMTP all Invite anyone mails will only send as plaintext.

How we can send this mail as HTML, too?

https://wpmailsmtp.com/buddypress-activation-email-notifications/#4_Add_Code_Snippet_to_Fix_BuddyPress_Emails

]]>
https://www.ads-software.com/support/topic/e-mail-will-not-sent/ <![CDATA[E-mail will not sent]]> https://www.ads-software.com/support/topic/e-mail-will-not-sent/ Mon, 06 Mar 2023 20:43:34 +0000 uponity Replies: 0

No emails are currently being sent to those who have been invited.

]]>
https://www.ads-software.com/support/topic/404-when-receiving-an-invitation-to-group/ <![CDATA[404 when receiving an invitation to group]]> https://www.ads-software.com/support/topic/404-when-receiving-an-invitation-to-group/ Fri, 03 Feb 2023 13:31:36 +0000 vero2022de Replies: 3

I’m using invite anyone together with buddypress, both updated. When I send invitations to groups, users come back to me saying they only see an error 404 message.

I deactivated invite anyone and invited from buddypress and it works fine, but we don’t want the friend request option in our web.

I can see that the url that is giving 404 is the same as the one created with buddypress /members/test/groups/invites/?n=1

Any way to solve this?

]]>
https://www.ads-software.com/support/topic/bug-found-34/ <![CDATA[Bug Found]]> https://www.ads-software.com/support/topic/bug-found-34/ Tue, 10 Jan 2023 05:53:13 +0000 azinkey Replies: 1

<b>Fatal error</b>: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function “ass_install_emails” not found or invalid function name

]]>
https://www.ads-software.com/support/topic/malware-found-11/ <![CDATA[Malware found?]]> https://www.ads-software.com/support/topic/malware-found-11/ Sat, 10 Dec 2022 17:29:55 +0000 jaroslawistok Replies: 2

GOTMLS malware plugin finds a malware in:

<?php

require( BP_INVITE_ANYONE_DIR . 'by-email/by-email-db.php' );
require( BP_INVITE_ANYONE_DIR . 'widgets/widgets.php' );
require( BP_INVITE_ANYONE_DIR . 'by-email/cloudsponge-integration.php' );

// Temporary function until bp_is_active is fully integrated
function invite_anyone_are_groups_running() {
	if ( function_exists( 'groups_install' ) )
		return true;

	if ( function_exists( 'bp_is_active' ) ) {
		if ( bp_is_active( 'groups' ) )
			return true;
	}

	return false;
}

function invite_anyone_add_by_email_css() {
	global $bp;

	if ( $bp->current_component == BP_INVITE_ANYONE_SLUG ) {
		$style_url = plugins_url() . '/invite-anyone/by-email/by-email-css.css';
		$style_file = WP_PLUGIN_DIR . '/invite-anyone/by-email/by-email-css.css';
        if (file_exists($style_file)) {
            wp_register_style('invite-anyone-by-email-style', $style_url);
            wp_enqueue_style('invite-anyone-by-email-style');
        }
    }
}
add_action( 'wp_print_styles', 'invite_anyone_add_by_email_css' );

function invite_anyone_add_by_email_js() {
	global $bp;

	if ( $bp->current_component == BP_INVITE_ANYONE_SLUG ) {
		$style_url = plugins_url() . '/invite-anyone/by-email/by-email-js.js';
		$style_file = WP_PLUGIN_DIR . '/invite-anyone/by-email/by-email-js.js';
        if (file_exists($style_file)) {
            wp_register_script('invite-anyone-by-email-scripts', $style_url);
            wp_enqueue_script('invite-anyone-by-email-scripts');
        }
    }
}
add_action( 'wp_print_scripts', 'invite_anyone_add_by_email_js' );

function invite_anyone_setup_globals() {
	global $bp, $wpdb;

	if ( !isset( $bp->invite_anyone ) ) {
		$bp->invite_anyone = new stdClass;
	}

	$bp->invite_anyone->id = 'invite_anyone';

	$bp->invite_anyone->table_name = $wpdb->base_prefix . 'bp_invite_anyone';
	$bp->invite_anyone->slug = 'invite-anyone';

	/* Register this in the active components array */
	$bp->active_components[$bp->invite_anyone->slug] = $bp->invite_anyone->id;
}
add_action( 'bp_setup_globals', 'invite_anyone_setup_globals', 2 );

function invite_anyone_opt_out_screen() {
	global $bp;

	if ( isset( $_POST['oops_submit'] ) ) {
		$oops_email = urlencode( stripslashes( $_POST['opt_out_email'] ) );
		$opt_out_link = add_query_arg( array(
			'iaaction' => 'accept-invitation',
			'email'    => $oops_email,
		), bp_get_root_domain() . '/' . bp_get_signup_slug() . '/' );
		bp_core_redirect( $opt_out_link );
	}

	$opt_out_button_text 	= __( 'Opt Out', 'invite-anyone' );
	$oops_button_text 	= __( 'Accept Invitation', 'invite-anyone' );

	$sitename 		= get_bloginfo( 'name' );

	$opt_out_message 	= sprintf( __( 'To opt out of future invitations to %s, make sure that your email is entered in the field below and click "Opt Out".', 'invite-anyone' ), $sitename );

	$oops_message 		= sprintf( __( 'If you are here by mistake and would like to accept your invitation to %s, click "Accept Invitation" instead.', 'invite-anyone' ), $sitename );

	if ( bp_is_register_page() && isset( $_GET['iaaction'] ) && 'opt-out' === urldecode( $_GET['iaaction'] ) ) {
		get_header();
?>
		<div id="content">
		<div class="padder">
		<?php if ( ! empty( $_POST['opt_out_submit'] ) ) : ?>
			<?php if ( $_POST['opt_out_submit'] == $opt_out_button_text && $email = urldecode( $_POST['opt_out_email'] ) ) : ?>
				<?php $email = str_replace( ' ', '+', $email ) ?>

				<?php check_admin_referer( 'invite_anyone_opt_out' ) ?>

				<?php if ( invite_anyone_mark_as_opt_out( $email ) ) : ?>
					<?php $opted_out_message = __( 'You have successfully opted out. No more invitation emails will be sent to you by this site.', 'invite-anyone' ) ?>
					<p><?php echo $opted_out_message ?></p>
				<?php else : ?>
					<p><?php _e( 'Sorry, there was an error in processing your request', 'invite-anyone' ) ?></p>
				<?php endif; ?>
			<?php else : ?>
				<?php /* I guess this should be some sort of error message? */ ?>
			<?php endif; ?>

		<?php else : ?>
			<?php if ( isset( $_GET['email'] ) && $email = $_GET['email'] ) : ?>
				<script type="text/javascript">
				jQuery(document).ready( function() {
					jQuery("input#opt_out_email").val("<?php echo esc_js( str_replace( ' ', '+', urldecode( $email ) ) ) ?>");
				});
				</script>
			<?php endif; ?>

			<form action="" method="post">

				<?php do_action( 'invite_anyone_before_optout_messages' ) ?>

				<p><?php echo $opt_out_message ?></p>

				<p><?php echo $oops_message ?></p>

				<?php do_action( 'invite_anyone_after_optout_messages' ) ?>

				<?php wp_nonce_field( 'invite_anyone_opt_out' ) ?>
				<p><?php _e( 'Email:', 'invite-anyone' ) ?> <input type="text" id="opt_out_email" name="opt_out_email" size="50" /></p>

				<p><input type="submit" name="opt_out_submit" value="<?php echo $opt_out_button_text ?>" /> <input type="submit" name="oops_submit" value="<?php echo $oops_button_text ?>" />
				</p>

			</form>
		<?php endif; ?>
		</div>
		</div>
<?php
		get_footer();
		die();

	}
}
add_action( 'wp', 'invite_anyone_opt_out_screen', 1 );

function invite_anyone_register_screen_message() {
	global $bp;

	if ( ! invite_anyone_is_accept_invitation_page() ) {
		return;
	}

	if ( isset( $_GET['email'] ) ) {
		$email = urldecode( $_GET['email'] );
	} else {
		$email = '';
	}

?>
	<?php if ( empty( $email ) ) : ?>
		<div id="message" class="error"><p><?php _e( "It looks like you're trying to accept an invitation to join the site, but some information is missing. Please try again by clicking on the link in the invitation email.", 'invite-anyone' ) ?></p></div>
	<?php endif; ?>

	<?php if ( $bp->signup->step == 'request-details' && ! empty( $email ) ) : ?>

		<?php do_action( 'accept_email_invite_before' ) ?>

		<script type="text/javascript">
		jQuery(document).ready( function() {
			jQuery("input#signup_email").val("<?php echo esc_js( str_replace( ' ', '+', $email ) ) ?>");
		});

		</script>

		<?php
			$ia_obj = invite_anyone_get_invitations_by_invited_email( $email );

			$inviters = array();
			if ( $ia_obj->have_posts() ) {
				while ( $ia_obj->have_posts() ) {
					$ia_obj->the_post();
					$inviters[] = get_the_author_meta( 'ID' );
				}
			}
			$inviters = array_unique( $inviters );

			$inviters_names = array();
			foreach ( $inviters as $inviter ) {
				$inviters_names[] = bp_core_get_user_displayname( $inviter );
			}

			if ( ! empty( $inviters_names ) ) {
				$message = sprintf( _n( 'Welcome! You’ve been invited to join the site by the following user: %s. Please fill out the information below to create your account.', 'Welcome! You’ve been invited to join the site by the following users: %s. Please fill out the information below to create your account.', count( $inviters_names ), 'invite-anyone' ), implode( ', ', $inviters_names ) );
			} else {
				$message = __( 'Welcome! You’ve been invited to join the site. Please fill out the information below to create your account.', 'invite-anyone' );
			}

			echo '<div id="message" class="success"><p>' . esc_html( $message ) . '</p></div>';

		?>

	<?php endif; ?>
<?php
}
add_action( 'bp_before_register_page', 'invite_anyone_register_screen_message' );

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 );
}
add_action( 'bp_core_activated_user', 'invite_anyone_activate_user', 10, 3 );

function invite_anyone_setup_nav() {
	global $bp;

	if ( !invite_anyone_access_test() )
		return;

	/* Add 'Send Invites' to the main user profile navigation */
	bp_core_new_nav_item( array(
		'name' => __( 'Send Invites', 'invite-anyone' ),
		'slug' => $bp->invite_anyone->slug,
		'position' => 80,
		'screen_function' => 'invite_anyone_screen_one',
		'default_subnav_slug' => 'invite-new-members',
		'show_for_displayed_user' => invite_anyone_access_test()
	) );

	$invite_anyone_link = $bp->loggedin_user->domain . $bp->invite_anyone->slug . '/';

	/* Create two sub nav items for this component */
	bp_core_new_subnav_item( array(
		'name' => __( 'Invite New Members', 'invite-anyone' ),
		'slug' => 'invite-new-members',
		'parent_slug' => $bp->invite_anyone->slug,
		'parent_url' => $invite_anyone_link,
		'screen_function' => 'invite_anyone_screen_one',
		'position' => 10,
		'user_has_access' => invite_anyone_access_test()
	) );

	bp_core_new_subnav_item( array(
		'name' => __( 'Sent Invites', 'invite-anyone' ),
		'slug' => 'sent-invites',
		'parent_slug' => $bp->invite_anyone->slug,
		'parent_url' => $invite_anyone_link,
		'screen_function' => 'invite_anyone_screen_two',
		'position' => 20,
		'user_has_access' => invite_anyone_access_test()
	) );
}
add_action( 'bp_setup_nav', 'invite_anyone_setup_nav' );

/**
 * Determine if current user can access invitation functions
 */
function invite_anyone_access_test() {
	global $current_user, $bp;

	$access_allowed = true;
	$iaoptions = invite_anyone_options();

	if ( ! is_user_logged_in() ) {
		$access_allowed = false;
	}

	// The site admin can see all
	elseif ( current_user_can( 'bp_moderate' ) ) {
		$access_allowed = true;
	}

	elseif ( bp_displayed_user_id() && ! bp_is_my_profile() ) {
		$access_allowed = false;
	}

	/* This is the last of the general checks: logged in, looking at own profile, and finally admin has set to "All Users".*/
	elseif ( isset( $iaoptions['email_visibility_toggle'] ) && 'no_limit' === $iaoptions['email_visibility_toggle'] ) {
		$access_allowed = true;
	}

	/* Minimum number of days since joined the site */
	elseif ( isset( $iaoptions['email_since_toggle'] ) && 'yes' === $iaoptions['email_since_toggle'] ) {
		if ( isset( $iaoptions['days_since'] ) && $since = $iaoptions['days_since'] ) {
			// WordPress's DAY_IN_SECONDS exists for WP >= 3.5, target version is 3.2, hence hard-coded value of 86400.
			$since = $since * 86400;

			$date_registered = strtotime( $current_user->data->user_registered );
			$time = time();

			if ( $time - $date_registered < $since ) {
				$access_allowed = false;
			}
		}
	}

	/* Minimum role on this blog. Users who are at the necessary role or higher should move right through this toward the 'return true' at the end of the function. */
	elseif ( isset( $iaoptions['email_role_toggle'] ) && 'yes' === $iaoptions['email_role_toggle'] ) {
		if ( isset( $iaoptions['minimum_role'] ) && $role = $iaoptions['minimum_role'] ) {
			switch ( $role ) {
				case 'Subscriber' :
					if ( ! current_user_can( 'read' ) ) {
						$access_allowed = false;
					}
					break;

				case 'Contributor' :
					if ( ! current_user_can( 'edit_posts' ) ) {
						$access_allowed = false;
					}
					break;

				case 'Author' :
					if ( ! current_user_can( 'publish_posts' ) ) {
						$access_allowed = false;
					}
					break;

				case 'Editor' :
					if ( ! current_user_can( 'delete_others_pages' ) ) {
						$access_allowed = false;
					}
					break;

				case 'Administrator' :
					if ( ! current_user_can( 'switch_themes' ) ) {
						$access_allowed = false;
					}
					break;
			}//end switch
		}//end if
	}

	/* User blacklist */
	elseif ( isset( $iaoptions['email_blacklist_toggle'] ) && 'yes' === $iaoptions['email_blacklist_toggle'] ) {
		if ( isset( $iaoptions['email_blacklist'] ) ) {
			$blacklist = wp_parse_id_list( $iaoptions['email_blacklist'] );
			$user_id = intval( $current_user->ID );
			if ( in_array( $user_id, $blacklist, true ) ) {
				$access_allowed = false;
			}
		}
	}

	return apply_filters( 'invite_anyone_access_test', $access_allowed );

}
add_action( 'wp_head', 'invite_anyone_access_test' );

/**
 * Catch and process email sends.
 *
 * @since 1.1.0
 */
function invite_anyone_catch_send() {
	global $bp;

	if ( ! is_user_logged_in() || ! bp_is_my_profile() ) {
		return;
	}

	if ( ! bp_is_current_component( $bp->invite_anyone->slug ) ) {
		return;
	}

	if ( ! bp_is_current_action( 'sent-invites' ) ) {
		return;
	}

	if ( ! bp_is_action_variable( 'send', 0 ) ) {
		return;
	}

	if ( ! invite_anyone_access_test() ) {
		return;
	}

	if ( ! isset( $_POST['ia-send-by-email-nonce'] ) || ! wp_verify_nonce( wp_unslash( $_POST['ia-send-by-email-nonce'] ), 'invite_anyone_send_by_email' ) ) {
		return;
	}

	if ( ! invite_anyone_process_invitations( stripslashes_deep( $_POST ) ) ) {
		bp_core_add_message( __( 'Sorry, there was a problem sending your invitations. Please try again.', 'invite-anyone' ), 'error' );
	}

	bp_core_redirect( bp_displayed_user_domain() . $bp->invite_anyone->slug . '/sent-invites' );
}
add_action( 'bp_actions', 'invite_anyone_catch_send' );

function invite_anyone_catch_clear() {
	global $bp;

	if ( isset( $_COOKIE['invite-anyone'] ) ) {
		$returned_data = json_decode( wp_unslash( $_COOKIE['invite-anyone'] ), true );

		if ( $returned_data ) {
			// We'll take a moment nice and early in the loading process to get returned_data
			$keys = array(
				'error_message',
				'error_emails',
				'subject',
				'message',
				'groups',
			);

			foreach ( $keys as $key ) {
				$bp->invite_anyone->returned_data[ $key ] = null;
				if ( isset( $returned_data[ $key ] ) ) {
					$value = stripslashes_deep( $returned_data[ $key ] );
					$bp->invite_anyone->returned_data[ $key ] = $value;
				}
			}
		}

		setcookie( 'invite-anyone', null, -1, '/' );

	}

	if ( isset( $_GET['clear'] ) ) {
		$clear_id = $_GET['clear'];

		$inviter_id = bp_loggedin_user_id();

		check_admin_referer( 'invite_anyone_clear' );

		if ( (int)$clear_id ) {
			if ( invite_anyone_clear_sent_invite( array( 'inviter_id' => $inviter_id, 'clear_id' => $clear_id ) ) )
				bp_core_add_message( __( 'Invitation cleared', 'invite-anyone' ) );
			else
				bp_core_add_message( __( 'There was a problem clearing the invitation.', 'invite-anyone' ), 'error' );
		} else {
			if ( invite_anyone_clear_sent_invite( array( 'inviter_id' => $inviter_id, 'type' => $clear_id ) ) )
				bp_core_add_message( __( 'Invitations cleared.', 'invite-anyone' ) );
			else
				bp_core_add_message( __( 'There was a problem clearing the invitations.', 'invite-anyone' ), 'error' );
		}

		bp_core_redirect( $bp->displayed_user->domain . $bp->invite_anyone->slug . '/sent-invites/' );
	}
}
add_action( 'bp_template_redirect', 'invite_anyone_catch_clear', 5 );

function invite_anyone_screen_one() {
	global $bp;

	/*
	print "<pre>";
	print_r($bp);
	*/

	/* Add a do action here, so your component can be extended by others. */
	do_action( 'invite_anyone_screen_one' );

	/* bp_template_title ought to be used - bp-default needs to markup the template tag
	and run a conditional check on template tag true to hide empty element markup or not
	add_action( 'bp_template_title', 'invite_anyone_screen_one_title' );
	*/
	add_action( 'bp_template_content', 'invite_anyone_screen_one_content' );

	bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
}

/*
function invite_anyone_screen_one_title() {

	 _e( 'Invite New Members', 'invite-anyone' );

	}
*/

function invite_anyone_screen_one_content() {
	global $bp;

	$iaoptions = invite_anyone_options();

	// Hack - catch already=accepted
	if ( ! empty( $_GET['already'] ) && 'accepted' === $_GET['already'] && bp_is_my_profile() ) {
		_e( 'It looks like you’ve already accepted your invitation to join the site.', 'invite-anyone' );
		return;
	}

	// If the user has maxed out his invites, no need to go on
	if ( !empty( $iaoptions['email_limit_invites_toggle'] ) && $iaoptions['email_limit_invites_toggle'] == 'yes' && !current_user_can( 'delete_others_pages' ) ) {
		$sent_invites       = invite_anyone_get_invitations_by_inviter_id( bp_displayed_user_id() );
		$sent_invites_count  = $sent_invites->post_count;
		if ( $sent_invites_count >= $iaoptions['limit_invites_per_user'] ) : ?>

			<h4><?php _e( 'Invite New Members', 'invite-anyone' ); ?></h4>

			<p id="welcome-message"><?php _e( 'You have sent the maximum allowed number of invitations.', 'invite-anyone' ); ?></em></p>

			<?php return;
		endif;
	}

	if ( !$max_invites = $iaoptions['max_invites'] )
		$max_invites = 5;

	$from_group = false;
	if ( !empty( $bp->action_variables ) ) {
		if ( 'group-invites' == $bp->action_variables[0] )
			$from_group = $bp->action_variables[1];
	}

	$returned_data = !empty( $bp->invite_anyone->returned_data ) ? $bp->invite_anyone->returned_data : false;

	/* If the user is coming from the widget, $returned_emails is populated with those email addresses */
	if ( isset( $_POST['invite_anyone_widget'] ) ) {
		check_admin_referer( 'invite-anyone-widget_' . $bp->loggedin_user->id );

		if ( !empty( $_POST['invite_anyone_email_addresses'] ) ) {
			$returned_data['error_emails'] = invite_anyone_parse_addresses( $_POST['invite_anyone_email_addresses'] );
		}

		/* If the widget appeared on a group page, the group ID should come along with it too */
		if ( isset( $_POST['invite_anyone_widget_group'] ) )
			$returned_data['groups'] = $_POST['invite_anyone_widget_group'];

	}

	// $returned_groups is padded so that array_search (below) returns true for first group */

	$counter = 0;
	$returned_groups = array( 0 );
	if ( ! empty( $returned_data['groups'] ) ) {
		foreach( $returned_data['groups'] as $group_id ) {
			$returned_groups[] = $group_id;
		}
	}

	// Get the returned email subject, if there is one
	$returned_subject = ! empty( $returned_data['subject'] ) ? stripslashes( $returned_data['subject'] ) : false;

	// Get the returned email message, if there is one
	$returned_message = ! empty( $returned_data['message'] ) ? stripslashes( $returned_data['message'] ) : false;

	if ( ! empty( $returned_data['error_message'] ) ) {
		?>
		<div class="invite-anyone-error error">
			<p><?php _e( "Some of your invitations were not sent. Please see the errors below and resubmit the failed invitations.", 'invite-anyone' ) ?></p>
		</div>
		<?php
	}

	$blogname = get_bloginfo('name');
	$welcome_message = sprintf( __( 'Invite friends to join %s by following these steps:', 'invite-anyone' ), $blogname );

  ?>
	<form id="invite-anyone-by-email" action="<?php echo $bp->displayed_user->domain . $bp->invite_anyone->slug . '/sent-invites/send/' ?>" method="post">

	<h4><?php _e( 'Invite New Members', 'invite-anyone' ); ?></h4>

	<?php

	if ( isset( $iaoptions['email_limit_invites_toggle'] ) && $iaoptions['email_limit_invites_toggle'] == 'yes' && !current_user_can( 'delete_others_pages' ) ) {
		if ( !isset( $sent_invites ) ) {
			$sent_invites = invite_anyone_get_invitations_by_inviter_id( bp_loggedin_user_id() );
			$sent_invites_count = $sent_invites->post_count;
		}

		$limit_invite_count = (int) $iaoptions['limit_invites_per_user'] - (int) $sent_invites_count;

		if ( $limit_invite_count < 0 ) {
			$limit_invite_count = 0;
		}

		?>

		<p class="description"><?php printf( __( 'The site administrator has limited each user to %1$d invitations. You have %2$d invitations remaining.', 'invite-anyone' ), (int) $iaoptions['limit_invites_per_user'], (int) $limit_invite_count ) ?></p>

		<?php
	}
	?>

	<p id="welcome-message"><?php echo esc_html( $welcome_message ) ?></p>

	<ol id="invite-anyone-steps">

		<li>
			<?php if ( ! empty( $returned_data['error_message'] ) ) : ?>
				<div class="invite-anyone-error error">
					<p><?php echo $returned_data['error_message'] ?></p>
				</div>
			<?php endif ?>

			<div class="manual-email">
				<label for="invite-anyone-email-addresses">
					<?php _e( 'Enter email addresses below, one per line.', 'invite-anyone' ) ?>
				</label>

				<?php if( invite_anyone_allowed_domains() ) : ?> <p class="description"><?php _e( 'You can only invite people whose email addresses end in one of the following domains:', 'invite-anyone' ) ?> <?php echo esc_html( invite_anyone_allowed_domains() ); ?></p><?php endif; ?>

				<?php if ( false !== $max_no_invites = invite_anyone_max_invites() ) : ?>
					<p class="description"><?php printf( __( 'You can invite a maximum of %s people at a time.', 'invite-anyone' ), $max_no_invites ) ?></p>
				<?php endif ?>

				<?php
				$error_emails = is_array( $returned_data ) && isset( $returned_data['error_emails'] ) ? $returned_data['error_emails'] : array();
				?>

				<?php invite_anyone_email_fields( $error_emails ); ?>
			</div>

			<?php /* invite_anyone_after_addresses gets $iaoptions so that Cloudsponge etc can tell whether certain components are activated, without an additional lookup */ ?>
			<?php do_action( 'invite_anyone_after_addresses', $iaoptions ) ?>

		</li>

		<li>
			<?php if ( $iaoptions['subject_is_customizable'] == 'yes' ) : ?>
				<label for="invite-anyone-custom-subject"><?php _e( '(optional) Customize the subject line of the invitation email.', 'invite-anyone' ) ?></label>
					<textarea name="invite_anyone_custom_subject" id="invite-anyone-custom-subject" rows="15" cols="10" ><?php echo esc_textarea( invite_anyone_invitation_subject( $returned_subject ) ) ?></textarea>
			<?php else : ?>
				<strong><?php _e( 'Subject:', 'invite-anyone' ) ?></strong> <?php echo esc_html( invite_anyone_invitation_subject( $returned_subject ) ) ?>

				<input type="hidden" id="invite-anyone-customised-subject" name="invite_anyone_custom_subject" value="<?php echo esc_attr( invite_anyone_invitation_subject() ) ?>" />
			<?php endif; ?>
		</li>

		<li>
			<?php if ( $iaoptions['message_is_customizable'] == 'yes' ) : ?>
				<label for="invite-anyone-custom-message"><?php _e( '(optional) Customize the text of the invitation.', 'invite-anyone' ) ?></label>
				<p class="description"><?php _e( 'The message will also contain a custom footer containing links to accept the invitation or opt out of further email invitations from this site.', 'invite-anyone' ) ?></p>
					<textarea name="invite_anyone_custom_message" id="invite-anyone-custom-message" cols="40" rows="10"><?php echo esc_textarea( invite_anyone_invitation_message( $returned_message ) ) ?></textarea>
			<?php else : ?>
				<label for="invite-anyone-custom-message"><?php _e( 'Message:', 'invite-anyone' ) ?></label>
					<textarea name="invite_anyone_custom_message" id="invite-anyone-custom-message" disabled="disabled"><?php echo esc_textarea( invite_anyone_invitation_message( $returned_message ) ) ?></textarea>

				<input type="hidden" name="invite_anyone_custom_message" value="<?php echo esc_attr( invite_anyone_invitation_message() ) ?>" />
			<?php endif; ?>

		</li>

		<?php if ( invite_anyone_are_groups_running() ) : ?>
			<?php if ( $iaoptions['can_send_group_invites_email'] == 'yes' && bp_has_groups( "per_page=10000&type=alphabetical&user_id=" . bp_loggedin_user_id() ) ) : ?>
			<li>
				<fieldset>
					<legend><?php _e( '(optional) Select some groups. Invitees will receive invitations to these groups when they join the site.', 'invite-anyone' ) ?></legend>
					<ul id="invite-anyone-group-list">
						<?php while ( bp_groups() ) : bp_the_group(); ?>
							<?php

							// Enforce per-group invitation settings
							if ( ! bp_groups_user_can_send_invites( bp_get_group_id() ) || 'anyone' !== invite_anyone_group_invite_access_test( bp_get_group_id() ) ) {
								continue;
							}

							?>
							<li>
							<input type="checkbox" name="invite_anyone_groups[]" id="invite_anyone_groups-<?php echo esc_attr( bp_get_group_id() ) ?>" value="<?php echo esc_attr( bp_get_group_id() ) ?>" <?php if ( $from_group == bp_get_group_id() || array_search( bp_get_group_id(), $returned_groups) ) : ?>checked<?php endif; ?> />

							<label for="invite_anyone_groups-<?php echo esc_attr( bp_get_group_id() ) ?>" class="invite-anyone-group-name"><?php bp_group_avatar_mini() ?> <span><?php bp_group_name() ?></span></label>

							</li>
						<?php endwhile; ?>

					</ul>
				</fieldset>
			</li>
			<?php endif; ?>

		<?php endif; ?>

		<?php wp_nonce_field( 'invite_anyone_send_by_email', 'ia-send-by-email-nonce' ); ?>
		<?php do_action( 'invite_anyone_addl_fields' ) ?>

	</ol>

	<div class="submit">
		<input type="submit" name="invite-anyone-submit" id="invite-anyone-submit" value="<?php _e( 'Send Invites', 'invite-anyone' ) ?> " />
	</div>

	</form>
	<?php
}

/**
 * invite_anyone_screen_two()
 *
 */
function invite_anyone_screen_two() {
	global $bp;

	do_action( 'invite_anyone_sent_invites_screen' );

	/* bp_template_title ought to be used - bp-default needs to markup the template tag
	and run a conditional check on template tag true to hide empty element markup or not
	add_action( 'bp_template_title', 'invite_anyone_screen_two_title' );
	*/

	add_action( 'bp_template_content', 'invite_anyone_screen_two_content' );

	bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
}
/*
  function invite_anyone_screen_two_title() {
	 _e( 'Sent Invites', 'invite-anyone' );
  }
*/

	function invite_anyone_screen_two_content() {
		global $bp;

		// Load the pagination helper
		if ( !class_exists( 'BBG_CPT_Pag' ) )
			require_once( BP_INVITE_ANYONE_DIR . 'lib/bbg-cpt-pag.php' );
		$pagination = new BBG_CPT_Pag;

		$inviter_id = bp_loggedin_user_id();

		if ( isset( $_GET['sort_by'] ) )
			$sort_by = $_GET['sort_by'];
		else
			$sort_by = 'date_invited';

		if ( isset( $_GET['order'] ) )
			$order = $_GET['order'];
		else
			$order = 'DESC';

		if ( 'DESC' !== $order ) {
			$order = 'ASC';
		}

		$base_url = $bp->displayed_user->domain . $bp->invite_anyone->slug . '/sent-invites/';

		?>

		<h4><?php _e( 'Sent Invites', 'invite-anyone' ); ?></h4>

		<?php $invites = invite_anyone_get_invitations_by_inviter_id( bp_loggedin_user_id(), $sort_by, $order, $pagination->get_per_page, $pagination->get_paged ) ?>

		<?php $pagination->setup_query( $invites ) ?>

		<?php if ( $invites->have_posts() ) : ?>
			<p id="sent-invites-intro"><?php _e( 'You have sent invitations to the following people.', 'invite-anyone' ) ?></p>

			<div class="ia-pagination">
				<div class="currently-viewing">
					<?php $pagination->currently_viewing_text() ?>
				</div>

				<div class="pag-links">
					<?php $pagination->paginate_links() ?>
				</div>
			</div>

			<table class="invite-anyone-sent-invites zebra"
			summary="<?php _e( 'This table displays a list of all your sent invites.
			Invites that have been accepted are highlighted in the listings.
			You may clear any individual invites, all accepted invites or all of the invites from the list.', 'invite-anyone' ) ?>">
				<thead>
					<tr>
					  <th scope="col" class="col-delete-invite"></th>
					  <th scope="col" class="col-email<?php if ( $sort_by == 'email' ) : ?> sort-by-me<?php endif ?>"><a class="<?php echo esc_attr( $order ) ?>" title="Sort column order <?php echo esc_attr( $order ) ?>" href="<?php echo esc_url( $base_url ) ?>?sort_by=email&order=<?php if ( $sort_by == 'email' && $order == 'ASC' ) : ?>DESC<?php else : ?>ASC<?php endif; ?>"><?php _e( 'Invited email address', 'invite-anyone' ) ?></a></th>
					  <th scope="col" class="col-group-invitations"><?php _e( 'Group invitations', 'invite-anyone' ) ?></th>
					  <th scope="col" class="col-date-invited<?php if ( $sort_by == 'date_invited' ) : ?> sort-by-me<?php endif ?>"><a class="<?php echo esc_attr( $order ) ?>" title="Sort column order <?php echo esc_attr( $order ) ?>" href="<?php echo esc_url( $base_url ) ?>?sort_by=date_invited&order=<?php if ( $sort_by == 'date_invited' && $order == 'DESC' ) : ?>ASC<?php else : ?>DESC<?php endif; ?>"><?php _e( 'Sent', 'invite-anyone' ) ?></a></th>
					  <th scope="col" class="col-date-joined<?php if ( $sort_by == 'date_joined' ) : ?> sort-by-me<?php endif ?>"><a class="<?php echo esc_attr( $order ) ?>" title="Sort column order <?php echo esc_attr( $order ) ?>" href="<?php echo esc_url( $base_url ) ?>?sort_by=date_joined&order=<?php if ( $order == 'DESC' ) : ?>ASC<?php else : ?>DESC<?php endif; ?>"><?php _e( 'Accepted', 'invite-anyone' ) ?></a></th>
					</tr>
				</thead>

				<tfoot>
				<tr id="batch-clear">
				  <td colspan="5" >
				   <ul id="invite-anyone-clear-links">
				      <li> <a title="<?php _e( 'Clear all accepted invites from the list', 'invite-anyone' ) ?>" class="confirm" href="<?php echo wp_nonce_url( $base_url . '?clear=accepted', 'invite_anyone_clear' ) ?>"><?php _e( 'Clear all accepted invitations', 'invite-anyone' ) ?></a></li>
				      <li class="last"><a title="<?php _e( 'Clear all your listed invites', 'invite-anyone' ) ?>" class="confirm" href="<?php echo wp_nonce_url( $base_url . '?clear=all', 'invite_anyone_clear' ) ?>"><?php _e( 'Clear all invitations', 'invite-anyone' ) ?></a></li>
				  </ul>
				 </td>
				</tr>
				</tfoot>

				<tbody>
				<?php while ( $invites->have_posts() ) : $invites->the_post() ?>

				<?php
					$emails = wp_get_post_terms( get_the_ID(), invite_anyone_get_invitee_tax_name() );

					// Should never happen, but was messing up my test env
					if ( empty( $emails ) ) {
						continue;
					}

					// Before storing taxonomy terms in the db, we replaced "+" with ".PLUSSIGN.", so we need to reverse that before displaying the email address.
					$email	= str_replace( '.PLUSSIGN.', '+', $emails[0]->name );

					$post_id = get_the_ID();

					$query_string = preg_replace( "|clear=[0-9]+|", '', $_SERVER['QUERY_STRING'] );

					$clear_url = ( $query_string ) ? $base_url . '?' . $query_string . '&clear=' . $post_id : $base_url . '?clear=' . $post_id;
					$clear_url = wp_nonce_url( $clear_url, 'invite_anyone_clear' );
					$clear_link = '<a class="clear-entry confirm" title="' . __( 'Clear this invitation', 'invite-anyone' ) . '" href="' . $clear_url . '">x<span></span></a>';

					$groups = wp_get_post_terms( get_the_ID(), invite_anyone_get_invited_groups_tax_name() );
					if ( !empty( $groups ) ) {
						$group_names = '<ul>';
						foreach( $groups as $group_term ) {
							$group = new BP_Groups_Group( $group_term->name );
							$group_names .= '<li>' . bp_get_group_name( $group ) . '</li>';
						}
						$group_names .= '</ul>';
					} else {
						$group_names = '-';
					}

					global $post;

					$date_invited = invite_anyone_format_date( $post->post_date );

					$accepted = get_post_meta( get_the_ID(), 'bp_ia_accepted', true );

					if ( $accepted ):
						$date_joined = invite_anyone_format_date( $accepted );
						$accepted = true;
					else:
						$date_joined = '-';
						$accepted = false;
					endif;

					?>

					<tr <?php if($accepted){ ?> class="accepted" <?php } ?>>
						<td class="col-delete-invite"><?php echo $clear_link ?></td>
						<td class="col-email"><?php echo esc_html( $email ) ?></td>
						<td class="col-group-invitations"><?php echo $group_names ?></td>
						<td class="col-date-invited"><?php echo esc_html( $date_invited ) ?></td>
						<td class="date-joined col-date-joined"><span></span><?php echo esc_html( $date_joined ) ?></td>
					</tr>
				<?php endwhile ?>
			 </tbody>
			</table>

			<div class="ia-pagination">
				<div class="currently-viewing">
					<?php $pagination->currently_viewing_text() ?>
				</div>

				<div class="pag-links">
					<?php $pagination->paginate_links() ?>
				</div>
			</div>

		<?php else : ?>

		<p id="sent-invites-intro"><?php _e( "You haven't sent any email invitations yet.", 'invite-anyone' ) ?></p>

		<?php endif; ?>
	<?php
	}

/**
 * Displays the field where email addresses are entered on the Send Invites page
 *
 * In version 0.8, this field was changed to be a textarea rather than individual fields.
 *
 * @package Invite Anyone
 *
 * @param array $returned_emails Optional. Emails returned because of a processing error
 */
function invite_anyone_email_fields( $returned_emails = false ) {
	if ( is_array( $returned_emails ) )
		$returned_emails = implode( "\n", $returned_emails );
?>
	<textarea name="invite_anyone_email_addresses" class="invite-anyone-email-addresses" id="invite-anyone-email-addresses"><?php echo $returned_emails ?></textarea>
<?php
}

function invite_anyone_invitation_subject( $returned_message = false ) {
	global $bp;

	if ( !$returned_message ) {
		$site_name = get_bloginfo('name');

		$iaoptions = invite_anyone_options();

		if ( empty( $iaoptions['default_invitation_subject'] ) ) {
			$text = sprintf( __( 'An invitation to join the %s community.', 'invite-anyone' ), $site_name );
		} else {
			$text = $iaoptions['default_invitation_subject'];
		}

		if ( !is_admin() ) {
			$text = invite_anyone_wildcard_replace( $text );
		}
	} else {
		$text = $returned_message;
	}

	return stripslashes( $text );
}

function invite_anyone_invitation_message( $returned_message = false ) {
	global $bp;

	if ( !$returned_message ) {
		$inviter_name = bp_core_get_user_displayname( bp_loggedin_user_id() );
		$blogname = get_bloginfo('name');

		$iaoptions = invite_anyone_options();

		if ( empty( $iaoptions['default_invitation_message'] ) ) {
			$text = sprintf( __( 'You have been invited by %%INVITERNAME%% to join the %s community.

Visit %%INVITERNAME%%\'s profile at %%INVITERURL%%.', 'invite-anyone' ), $blogname ); /* Do not translate the strings embedded in %% ... %% ! */
		} else {
			$text = $iaoptions['default_invitation_message'];
		}

		if ( !is_admin() ) {
			$text = invite_anyone_wildcard_replace( $text );
		}
	} else {
		$text = $returned_message;
	}

	return apply_filters( 'invite_anyone_get_invitation_message', stripslashes( $text ) );
}

function invite_anyone_process_footer( $email ) {

	$iaoptions = invite_anyone_options();

	if ( empty( $iaoptions['addl_invitation_message'] ) ) {

		$footer = apply_filters( 'invite_anyone_accept_invite_footer_message', __( 'To accept this invitation, please visit %%ACCEPTURL%%', 'invite-anyone' ) );
		$footer .= '

';
		$footer .= apply_filters( 'invite_anyone_opt_out_footer_message', __( 'To opt out of future invitations to this site, please visit %%OPTOUTURL%%', 'invite-anyone' ) );
	} else {
		$footer = $iaoptions['addl_invitation_message'];
	}

	return stripslashes( $footer );
}

/**
 * Get the invitation acceptance URL for a given email address.
 *
 * @since 1.4.0
 *
 * @param string $email Email address.
 * @return string
 */
function invite_anyone_get_accept_url( $email ) {
	$accept_link  = add_query_arg( array(
		'iaaction' => 'accept-invitation',
		'email'    => $email,
	), bp_get_root_domain() . '/' . bp_get_signup_slug() . '/' );

	/**
	 * Filters the invitation acceptance URL for a given email address.
	 *
	 * @since 0.3.3
	 * @since 1.4.0 Introduced <code>$email</code> parameter.
	 *
	 * @param string $accept_link Accept URL.
	 * @param string $email       Email address.
	 */
	return apply_filters( 'invite_anyone_accept_url', $accept_link, $email );
}

/**
 * Get the opt-out URL for a given email address.
 *
 * @since 1.4.0
 *
 * @param string $email Email address.
 * @return string
 */
function invite_anyone_get_opt_out_url( $email ) {
	$opt_out_link = add_query_arg( array(
		'iaaction' => 'opt-out',
		'email'    => $email,
	), bp_get_root_domain() . '/' . bp_get_signup_slug() . '/' );

	/**
	 * Filters the opt-out acceptance URL for a given email address.
	 *
	 * @since 1.4.0
	 *
	 * @param string $opt_out_link Opt-out URL.
	 * @param string $email        Email address.
	 */
	return apply_filters( 'invite_anyone_opt_out_url', $opt_out_link, $email );
}

function invite_anyone_wildcard_replace( $text, $email = false ) {
	global $bp;

	$inviter_name = bp_core_get_user_displayname( bp_loggedin_user_id() );
	$site_name    = get_bloginfo( 'name' );
	$inviter_url  = bp_loggedin_user_domain();

	$email = urlencode( $email );

	$accept_link  = invite_anyone_get_accept_url( $email );
	$opt_out_link = invite_anyone_get_opt_out_url( $email );

	$text = str_replace( '%%INVITERNAME%%', $inviter_name, $text );
	$text = str_replace( '%%INVITERURL%%', $inviter_url, $text );
	$text = str_replace( '%%SITENAME%%', $site_name, $text );
	$text = str_replace( '%%OPTOUTURL%%', $opt_out_link, $text );
	$text = str_replace( '%%ACCEPTURL%%', $accept_link, $text );

	/* Adding single % replacements because lots of people are making the mistake */
	$text = str_replace( '%INVITERNAME%', $inviter_name, $text );
	$text = str_replace( '%INVITERURL%', $inviter_url, $text );
	$text = str_replace( '%SITENAME%', $site_name, $text );
	$text = str_replace( '%OPTOUTURL%', $opt_out_link, $text );
	$text = str_replace( '%ACCEPTURL%', $accept_link, $text );

	return $text;
}

/**
 * Get the max allowed invites
 */
function invite_anyone_max_invites() {
	$options = invite_anyone_options();
	return isset( $options['max_invites'] ) ? intval( $options['max_invites'] ) : false;
}

function invite_anyone_allowed_domains() {

	$domains = '';

	if ( function_exists( 'get_site_option' ) ) {
		$limited_email_domains = get_site_option( 'limited_email_domains' );

		if ( !$limited_email_domains || !is_array( $limited_email_domains ) )
			return $domains;

		foreach( $limited_email_domains as $domain )
			$domains .= "<strong>$domain</strong> ";
	}

	return $domains;
}

/**
 * Fetches the invitee taxonomy name out of the $bp global so it can be queried in the template
 *
 * @package Invite Anyone
 * @since 0.8
 *
 * @return str $tax_name
 */
function invite_anyone_get_invitee_tax_name() {
	global $bp;

	$tax_name = '';

	if ( !empty( $bp->invite_anyone->invitee_tax_name ) )
		$tax_name = $bp->invite_anyone->invitee_tax_name;

	return $tax_name;
}

/**
 * Fetches the groups taxonomy name out of the $bp global so it can be queried in the template
 *
 * @package Invite Anyone
 * @since 0.8
 *
 * @return str $tax_name
 */
function invite_anyone_get_invited_groups_tax_name() {
	global $bp;

	$tax_name = '';

	if ( !empty( $bp->invite_anyone->invited_groups_tax_name ) )
		$tax_name = $bp->invite_anyone->invited_groups_tax_name;

	return $tax_name;
}

function invite_anyone_format_date( $date ) {
	return date_i18n( get_option( 'date_format' ), strtotime( $date ) );
}

/**
 * Parses email addresses, comma-separated or line-separated, into an array
 *
 * @package Invite Anyone
 * @since 0.8.8
 *
 * @param str $address_string The raw string from the input box
 * @return array $emails An array of addresses
 */
function invite_anyone_parse_addresses( $address_string ) {

	$emails = array();

	// First, split by line breaks
	$rows = explode( "\n", $address_string );

	// Then look through each row to split by comma
	foreach( $rows as $row ) {
		$row_addresses = explode( ',', $row );

		// Then walk through and add each address to the array
		foreach( $row_addresses as $row_address ) {
			$row_address_trimmed = trim( $row_address );

			// We also have to make sure that the email address isn't empty
			if ( ! empty( $row_address_trimmed ) && ! in_array( $row_address_trimmed, $emails ) )
				$emails[] = $row_address_trimmed;
		}
	}

	return apply_filters( 'invite_anyone_parse_addresses', $emails, $address_string );
}

function invite_anyone_process_invitations( $data ) {
	global $bp;

	$options = invite_anyone_options();

	$emails = false;
	// Parse out the individual email addresses
	if ( !empty( $data['invite_anyone_email_addresses'] ) ) {
		$emails = invite_anyone_parse_addresses( $data['invite_anyone_email_addresses'] );
	}

	// Filter the email addresses so that plugins can have a field day
	$emails = apply_filters( 'invite_anyone_submitted_email_addresses', $emails, $data );

	// Set up a wrapper for any data to return to the Send Invites screen in case of error
	$returned_data = array(
		'error_message' => false,
		'error_emails'  => array(),
		'groups' 	=> isset( $data['invite_anyone_groups'] ) ? $data['invite_anyone_groups'] : ''
	);

	if ( 'yes' === $options['subject_is_customizable'] ) {
		$data['invite_anyone_custom_subject'] = $data['invite_anyone_custom_subject'];
	} else {
		$data['invite_anyone_custom_subject'] = invite_anyone_invitation_subject();
	}

	if ( 'yes' === $options['message_is_customizable'] ) {
		$data['invite_anyone_custom_message'] = $data['invite_anyone_custom_message'];
	} else {
		$data['invite_anyone_custom_message'] = invite_anyone_invitation_message();
	}

	$returned_data['subject'] = $data['invite_anyone_custom_subject'];
	$returned_data['message'] = $data['invite_anyone_custom_message'];

	// Check against the max number of invites. Send back right away if there are too many.
	$max_invites = ! empty( $options['max_invites'] ) ? $options['max_invites'] : 5;

	if ( count( $emails ) > $max_invites ) {

		$returned_data['error_message']	= sprintf( __( 'You are only allowed to invite up to %s people at a time. Please remove some addresses and try again', 'invite-anyone' ), $max_invites );
		$returned_data['error_emails'] 	= $emails;

		setcookie( 'invite-anyone', wp_json_encode( $returned_data ), 0, '/' );
		$redirect = bp_loggedin_user_domain() . $bp->invite_anyone->slug . '/invite-new-members/';
		bp_core_redirect( $redirect );
		die();
	}

	if ( empty( $emails ) ) {
		bp_core_add_message( __( 'You didn\'t include any email addresses!', 'invite-anyone' ), 'error' );
		bp_core_redirect( $bp->loggedin_user->domain . $bp->invite_anyone->slug . '/invite-new-members' );
		die();
	}

	// Max number of invites sent
	$limit_total_invites = !empty( $options['email_limit_invites_toggle'] ) && 'no' != $options['email_limit_invites_toggle'];
	if ( $limit_total_invites && !current_user_can( 'delete_others_pages' ) ) {
		$sent_invites = invite_anyone_get_invitations_by_inviter_id( bp_loggedin_user_id() );
		$sent_invites_count      = (int) $sent_invites->post_count;
		$remaining_invites_count = (int) $options['limit_invites_per_user'] - $sent_invites_count;

		if ( count( $emails ) > $remaining_invites_count ) {
			$returned_data['error_message'] = sprintf( __( 'You are only allowed to invite %s more people. Please remove some addresses and try again', 'invite-anyone' ), $remaining_invites_count );
			$returned_data['error_emails'] = $emails;

			setcookie( 'invite-anyone', wp_json_encode( $returned_data ), 0, '/' );
			$redirect = bp_loggedin_user_domain() . $bp->invite_anyone->slug . '/invite-new-members/';
			bp_core_redirect( $redirect );
			die();
		}
	}

	// Turn the CS emails into an array so that they can be matched against the main list
	if ( isset( $_POST['cloudsponge-emails'] ) ) {
		$cs_emails = explode( ',', $_POST['cloudsponge-emails'] );
	}

	// validate email addresses
	foreach( $emails as $key => $email ) {
		$check = invite_anyone_validate_email( $email );
		switch ( $check ) {

			case 'opt_out' :
				$returned_data['error_message'] .= sprintf( __( '<strong>%s</strong> has opted out of email invitations from this site.', 'invite-anyone' ), $email );
				break;

			case 'used' :
				$returned_data['error_message'] .= sprintf( __( "<strong>%s</strong> is already a registered user of the site.", 'invite-anyone' ), $email );
				break;

			case 'unsafe' :
				$returned_data['error_message'] .= sprintf( __( '<strong>%s</strong> is not a permitted email address.', 'invite-anyone' ), $email );
				break;

			case 'invalid' :
				$returned_data['error_message'] .= sprintf( __( '<strong>%s</strong> is not a valid email address. Please make sure that you have typed it correctly.', 'invite-anyone' ), $email );
				break;

			case 'limited_domain' :
				$returned_data['error_message'] .= sprintf( __( '<strong>%s</strong> is not a permitted email address. Please make sure that you have typed the domain name correctly.', 'invite-anyone' ), $email );
				break;
		}

		// If there was an error in validation, we won't process this email
		if ( $check != 'okay' ) {
			$returned_data['error_message'] .= '<br />';
			$returned_data['error_emails'][] = $email;
			unset( $emails[$key] );
		}
	}

	if ( ! empty( $emails ) ) {

		unset( $message, $to );

		/* send and record invitations */

		do_action( 'invite_anyone_process_addl_fields' );

		$groups = ! empty( $data['invite_anyone_groups'] ) ? $data['invite_anyone_groups'] : array();
		$is_error = 0;

		$do_bp_email = true === function_exists( 'bp_send_email' ) && true === ! apply_filters( 'bp_email_use_wp_mail', false );

		foreach ( $emails as $email ) {
			$subject = stripslashes( strip_tags( $data['invite_anyone_custom_subject'] ) );

			if ( $do_bp_email ) {
				$custom_message = stripslashes( $data['invite_anyone_custom_message'] );
				$accept_url     = invite_anyone_get_accept_url( $email );
				$opt_out_url    = invite_anyone_get_opt_out_url( $email );
			} else {
				$custom_message = stripslashes( strip_tags( $data['invite_anyone_custom_message'] ) );
			}

			$footer = invite_anyone_process_footer( $email );
			$footer = invite_anyone_wildcard_replace( $footer, $email );

			$message = $custom_message . '

================
';
			$message .= $footer;

			/**
			 * Filters the email address of an outgoing email.
			 *
			 * @since 1.3.20 Added the $data parameter.
			 *
			 * @param string $email Email address.
			 * @param array  $data  Data about the information.
			 */
			$to = apply_filters( 'invite_anyone_invitee_email', $email, $data );

			/**
			 * Filters the subject line of an outgoing email.
			 *
			 * @since 1.3.20 Added the $email and $data parameters.
			 *
			 * @param string $subject The email subject.
			 * @param array  $data    Data about the information.
			 * @param string $email   Email address of the invited user.
			 */
			$subject = apply_filters( 'invite_anyone_invitation_subject', $subject, $data, $email );

			/**
			 * Filters the contents of an outgoing plaintext email.
			 *
			 * @since 1.3.20 Added the $email and $data parameters.
			 *
			 * @param string $message The email message.
			 * @param array  $data    Data about the information.
			 * @param string $email   Email address of the invited user.
			 */
			$message = apply_filters( 'invite_anyone_invitation_message', $message, $data, $email );

			// BP 2.5+
			if ( $do_bp_email ) {
				$bp_email_args = array(
					'tokens' => array(
						'ia.subject'           => $subject,
						'ia.content'           => $custom_message,
						'ia.content_plaintext' => $message,
						'ia.accept_url'        => $accept_url,
						'ia.opt_out_url'       => $opt_out_url,
						'recipient.name'       => $to,
					),
					'subject' => $subject,
					'content' => $message,
				);

				add_filter( 'bp_email_get_salutation', 'invite_anyone_replace_bp_email_salutation', 10, 2 );
				bp_send_email( 'invite-anyone-invitation', $to, $bp_email_args );

				remove_filter( 'bp_email_get_salutation', 'invite_anyone_replace_bp_email_salutation', 10, 2 );

			} else {
				wp_mail( $to, $subject, $message );
			}

			/* todo: isolate which email(s) cause problems, and send back to user */
		/*	if ( !invite_anyone_send_invitation( $bp->loggedin_user->id, $email, $message, $groups ) )
				$is_error = 1; */

			// Determine whether this address came from CloudSponge
			$is_cloudsponge = isset( $cs_emails ) && in_array( $email, $cs_emails ) ? true : false;

			invite_anyone_record_invitation( $bp->loggedin_user->id, $email, $message, $groups, $subject, $is_cloudsponge );

			do_action( 'sent_email_invite', $bp->loggedin_user->id, $email, $groups );

			unset( $message, $to );
		}

		// Set a success message

		$success_message = sprintf( __( "Invitations were sent successfully to the following email addresses: %s", 'invite-anyone' ), implode( ", ", $emails ) );
		bp_core_add_message( $success_message );

		do_action( 'sent_email_invites', $bp->loggedin_user->id, $emails, $groups );
	} else {
		$success_message = sprintf( __( "Please correct your errors and resubmit.", 'invite-anyone' ) );
		bp_core_add_message( $success_message, 'error' );
	}

	// If there are errors, redirect to the Invite New Members page
	if ( ! empty( $returned_data['error_emails'] ) ) {
		setcookie( 'invite-anyone', wp_json_encode( $returned_data ), 0, '/' );
		$redirect = bp_loggedin_user_domain() . $bp->invite_anyone->slug . '/invite-new-members/';
		bp_core_redirect( $redirect );
		die();
	}

	return true;
}

/**
 * Replaces the customized salutation in outgoing invitation emails.
 *
 * There's no first name, so we just say 'Hello' instead.
 *
 * @since 1.4.0
 *
 * @param string $salutation
 * @param array  $settings
 * @return string
 */
function invite_anyone_replace_bp_email_salutation( $salutation, $settings ) {
	/**
	 * Filters the IA email salutation.
	 *
	 * @since 1.4.0
	 *
	 * @param string $ia_salutation Salutation from IA.
	 * @param string $salutation    Salutation from BP.
	 * @param array  $settings      Email settings.
	 */
	return apply_filters( 'invite_anyone_replace_bp_email_salutation', _x( 'Hello,', 'Invite Anyone email salutation', 'invite-anyone' ), $salutation, $settings );
}

function invite_anyone_send_invitation( $inviter_id, $email, $message, $groups ) {
	global $bp;

}

/**
 * Redirect from old 'accept-invitation' and 'opt-out' email formats
 *
 * Invite Anyone used to use the current_action and action_variables for
 * subpages of the registration screen. This caused some problems with URL
 * encoding, and it also broke with BP 2.1. In IA 1.3.4, this functionality
 * was moved to URL arguments; the current function handles backward
 * compatibility with the old addresses.
 *
 * @since 1.3.4
 */
function invite_anyone_accept_invitation_backward_compatibility() {
	if ( ! bp_is_register_page() ) {
		return;
	}

	if ( ! bp_current_action() ) {
		return;
	}

	$action = bp_current_action();

	if ( ! in_array( $action, array( 'accept-invitation', 'opt-out' ) ) ) {
		return;
	}

	$redirect_to = add_query_arg( 'iaaction', $action, bp_get_root_domain() . '/' . bp_get_signup_slug() . '/' );

	$email = bp_action_variable( 0 );
	$email = str_replace( ' ', '+', $email );

	if ( ! empty( $email ) ) {
		$redirect_to = add_query_arg( 'email', $email, $redirect_to );
	}

	bp_core_redirect( $redirect_to );
	die();
}
add_action( 'bp_actions', 'invite_anyone_accept_invitation_backward_compatibility', 0 );

/**
 * Is this the 'accept-invitation' page?
 *
 * @since 1.3.4
 *
 * @return bool
 */
function invite_anyone_is_accept_invitation_page() {
	$retval = false;

	if ( bp_is_register_page() && ! empty( $_GET['iaaction'] ) && 'accept-invitation' === urldecode( $_GET['iaaction'] ) ) {
		$retval = true;
	}

	return apply_filters( 'invite_anyone_is_accept_invitation_page', $retval );
}

function invite_anyone_bypass_registration_lock() {
	global $bp;

	if ( ! invite_anyone_is_accept_invitation_page() ) {
		return;
	}

	if ( ! isset( $_GET['email'] ) || ! $email = urldecode( $_GET['email'] ) ) {
		return;
	}

	$options = invite_anyone_options();

	if ( empty( $options['bypass_registration_lock'] ) || $options['bypass_registration_lock'] != 'yes' )
		return;

	// Check to make sure that it's actually a valid email
	$ia_obj = invite_anyone_get_invitations_by_invited_email( $email );

	if ( !$ia_obj->have_posts() ) {
		bp_core_add_message( __( "We couldn't find any invitations associated with this email address.", 'invite-anyone' ), 'error' );
		return;
	}

	// To support old versions of BP, we have to force the overloaded
	// site_options property in some cases
	if ( is_multisite() ) {
		$site_options = $bp->site_options;
		if ( !empty( $bp->site_options['registration'] ) && $bp->site_options['registration'] == 'blog' ) {
			$site_options['registration'] = 'all';
		} else if ( !empty( $bp->site_options['registration'] ) && $bp->site_options['registration'] == 'none' ) {
			$site_options['registration'] = 'user';
		}
		$bp->site_options = $site_options;

		add_filter( 'bp_get_signup_allowed', '__return_true' );
	} else {
		add_filter( 'option_users_can_register', '__return_true' );
	}
}
add_action( 'wp', 'invite_anyone_bypass_registration_lock', 1 );

/**
 * Double check that passed email address matches an existing invitation when registration lock bypass is on.
 *
 * @since 1.2
 *
 * @param array $results Error results from user signup validation
 * @return array
 */
function invite_anyone_check_invitation( $results ) {
	if ( ! invite_anyone_is_accept_invitation_page() ) {
		return $results;
	}

	// Check to make sure that it's actually a valid email
	$ia_obj = invite_anyone_get_invitations_by_invited_email( $results['user_email'] );

	if ( !$ia_obj->have_posts() ) {
		$errors = new WP_Error();
		$errors->add( 'user_email', __( "We couldn't find any invitations associated with this email address.", 'invite-anyone' ) );
		$results['errors'] = $errors;
	}

	return $results;
}
add_filter( 'bp_core_validate_user_signup', 'invite_anyone_check_invitation' );

function invite_anyone_validate_email( $user_email ) {

	$status = 'okay';

	if ( invite_anyone_check_is_opt_out( $user_email ) ) {
		$status = 'opt_out';
	} else if ( $user = get_user_by( 'email', $user_email ) ) {
		$status = 'used';
	} else if ( function_exists( 'is_email_address_unsafe' ) && is_email_address_unsafe( $user_email ) ) {
		$status = 'unsafe';
	} else if ( function_exists( 'is_email' ) && !is_email( $user_email ) ) {
		$status = 'invalid';
	}

	if ( function_exists( 'get_site_option' ) ) {
		if ( $limited_email_domains = get_site_option( 'limited_email_domains' ) ) {
			if ( is_array( $limited_email_domains ) && empty( $limited_email_domains ) == false ) {
				$emaildomain = strtolower( substr( $user_email, 1 + strpos( $user_email, '@' ) ) );

				$is_valid_domain = false;
				foreach ( $limited_email_domains as $led ) {
					if ( $emaildomain === strtolower( $led ) ) {
						$is_valid_domain = true;
						break;
					}
				}

				if ( ! $is_valid_domain ) {
					$status = 'limited_domain';
				}
			}
		}
	}

	return apply_filters( 'invite_anyone_validate_email', $status, $user_email );
}

/**
 * Catches attempts to reaccept an invitation, and redirects appropriately
 *
 * If you attempt to access the register page when logged in, you get bounced
 * to the home page. This is a BP feature. Because accept-invitation is a
 * subpage of register, this happens for accept-invitation pages as well.
 * However, people are more likely to try to visit this page than the vanilla
 * register page, because they've gotten an email inviting them to the site.
 *
 * So this function catches logged-in visits to /register/accept-invitation,
 * and if the email address in the URL matches the logged-in user's email
 * address, redirects them to their invite-anyone page to see the a message.
 *
 * @since 1.0.20
 */
function invite_anyone_already_accepted_redirect( $redirect ) {
	global $bp;

	if ( ! invite_anyone_is_accept_invitation_page() ) {
		return $redirect;
	}

	if ( empty( $_GET['email'] ) ) {
		return $redirect;
	}

	$reg_email = urldecode( $_GET['email'] );

	if ( bp_core_get_user_email( bp_loggedin_user_id() ) !== $reg_email ) {
		return $redirect;
	}

	$redirect = add_query_arg( 'already', 'accepted', trailingslashit( bp_loggedin_user_domain() . $bp->invite_anyone->slug ) );

	return $redirect;
}
add_filter( 'bp_loggedin_register_page_redirect_to', 'invite_anyone_already_accepted_redirect' );

/** BP emails ****************************************************************/

/**
 * Install Invite Anyone emails during email installation routine for BuddyPress.
 *
 * @since 1.4.0
 *
 * @param bool $post_exists_check Should we check to see if our email post types exist before installing?
 *                                Default: false.
 */
function invite_anyone_install_emails( $post_exists_check = false ) {
	// No need to check if our post types exist.
	if ( ! $post_exists_check ) {
		invite_anyone_set_email_type( 'invite-anyone-invitation', false );

	// Only create email post types if they do not exist.
	} else {
		switch_to_blog( bp_get_root_blog_id() );

		$mail_types = array( 'invite-anyone-invitation' );

		// Try to fetch email posts with our taxonomy.
		$emails = get_posts( array(
			'fields'           => 'ids',
			'post_status'      => 'publish',
			'post_type'        => bp_get_email_post_type(),
			'posts_per_page'   => 1,
			'suppress_filters' => false,
			'tax_query' => array(
				'relation' => 'OR',
				array(
					'taxonomy' => bp_get_email_tax_type(),
					'field'    => 'slug',
					'terms'    => $mail_types,
				),
			),
		) );

		// See if our taxonomies are attached to our email posts.
		$found = array();
		foreach ( $emails as $post_id ) {
			$tax   = wp_get_object_terms( $post_id, bp_get_email_tax_type(), array( 'fields' => 'slugs' ) );
			$found = array_merge( $found, (array) $tax );
		}

		restore_current_blog();

		// Find out if we need to create any posts.
		$to_create = array_diff( $mail_types, $found );
		if ( empty( $to_create ) ) {
			return;
		}

		// Create posts with our email types.
		foreach ( $to_create as $email_type ) {
			invite_anyone_set_email_type( $email_type, false );
		}
	}
}
add_action( 'bp_core_install_emails', 'ass_install_emails' );

/**
 * Sets the email situation type for use in Invite Anyone.
 *
 * Only applicable for BuddyPress 2.5+.
 *
 * @since 1.4.0
 *
 * @param string $email_type The email type to fetch.
 * @param bool   $term_check Check if our email term exists before creating our specific email
 *                           situation. Default: true.
 */
function invite_anyone_set_email_type( $email_type, $term_check = true ) {
	$switched = false;

	if ( false === bp_is_root_blog() ) {
		$switched = true;
		switch_to_blog( bp_get_root_blog_id() );
	}

	if ( true === $term_check ) {
		$term = term_exists( $email_type, bp_get_email_tax_type() );
	} else {
		$term = 0;
	}

	// Term already exists so don't do anything.
	if ( true === $term_check && $term !== 0 && $term !== null ) {
		if ( true === $switched ) {
			restore_current_blog();
		}

		return;

	// Create our email situation.
	} else {
		// Set up default email content depending on the email type.
		switch ( $email_type ) {
			// Site invitations.
			case 'invite-anyone-invitation' :
				/* translators: do not remove {} brackets or translate its contents. */
				$post_title = __( '[<code>site.name</code>] <code>ia.subject</code>', 'invite-anyone' );

				/* translators: do not remove {} brackets or translate its contents. */
				$html_content = __( "<code>ia.content</code><br /><hr><a href=\"<code>ia.accept_url</code>\">Accept or reject this invitation</a> &middot; <a href=\"<code>ia.opt_out_url</code>\">Opt out of future invitations</a>", 'invite-anyone' );

				/* translators: do not remove {} brackets or translate its contents. */
				$plaintext_content = __( "<code>ia.content_plaintext</code>", 'invite-anyone' );

				$situation_desc = __( 'A user is invited to join the site by email. Used by the Invite Anyone plugin.', 'invite-anyone' );

				break;
		}

		// Sanity check!
		if ( false === isset( $post_title ) ) {
			if ( true === $switched ) {
				restore_current_blog();
			}

			return;
		}

		$id = $email_type;

		$defaults = array(
			'post_status' => 'publish',
			'post_type'   => bp_get_email_post_type(),
		);

		$email = array(
			'post_title'   => $post_title,
			'post_content' => $html_content,
			'post_excerpt' => $plaintext_content,
		);

		// Email post content.
		$post_id = wp_insert_post( bp_parse_args( $email, $defaults, 'install_email_' . $id ) );

		// Save the situation.
		if ( ! is_wp_error( $post_id ) ) {
			$tt_ids = wp_set_object_terms( $post_id, $id, bp_get_email_tax_type() );

			// Situation description.
			if ( ! is_wp_error( $tt_ids ) ) {
				$term = get_term_by( 'term_taxonomy_id', (int) $tt_ids[0], bp_get_email_tax_type() );
				wp_update_term( (int) $term->term_id, bp_get_email_tax_type(), array(
					'description' => $situation_desc,
				) );
			}
		}
	}

	if ( true === $switched ) {
		restore_current_blog();
	}
}

The site is now rainbowsongs.org
IN QUARANT?NE

]]>
https://www.ads-software.com/support/topic/registration-link-goes-to-404-2/ <![CDATA[Registration link goes to 404]]> https://www.ads-software.com/support/topic/registration-link-goes-to-404-2/ Tue, 11 Oct 2022 19:48:05 +0000 capitalsecurity Replies: 0

Hello,
when I send a registration email to someone and they go to the link, it goes to a 404 page. i saw that there was another thread similar, https://www.ads-software.com/support/topic/registration-link-goes-to-404/, and I already spent a few hours trying to find this page and doing research on this topic.
I am using buddyboss and the buddyboss theme
thank you

]]>
https://www.ads-software.com/support/topic/invite-anyone-member-search-not-working/ <![CDATA[Invite Anyone Member Search not working]]> https://www.ads-software.com/support/topic/invite-anyone-member-search-not-working/ Fri, 23 Sep 2022 14:15:28 +0000 mbronder Replies: 0

Hi- I’ve been pretty happy with the invite functionality in Invite Anyone wrt inviting new folks to the site via email/cloudsponge, running with BuddyBoss

We’re having an issue with the “Search Members to Invite” box not returning any results, and the “Select people to invite from friends list” not returning any suggestions.

“Select members from Directory” seems to work fine.

Any thoughts would be appreciated.

Thanks,

]]>
https://www.ads-software.com/support/topic/administrator-have-to-be-members-to-be-able-to-invit/ <![CDATA[Administrator have to be members to be able to invit]]> https://www.ads-software.com/support/topic/administrator-have-to-be-members-to-be-able-to-invit/ Mon, 19 Sep 2022 09:05:02 +0000 eguibs Replies: 0

Hello ??

I think there is an unwanted behaviour with the plugin:

The plugin restricts the invite-anyone route when an administrator is not a member of a group. Thus it differs from BuddyPress way of handle access of invitations which is allowed for administrators:

Unfortunately there are no hooks available to address this issue.

the problem is located in this function :
function invite_anyone_group_invite_access_test

if ( ! groups_is_user_member( $user_id, $group_id ) ) {
return ‘noone’;
}

I’m not used to how to handle tickets for wordpress plugins ( i’m looking for a way to create one )

thank you ! hand have a nice day ??

]]>
https://www.ads-software.com/support/topic/shortcode-906/ <![CDATA[shortcode]]> https://www.ads-software.com/support/topic/shortcode-906/ Sat, 03 Sep 2022 09:01:32 +0000 albertmart Replies: 0

hi there I need a shortcode for inviting friends or invitation. is there a shortcode or not? Thanks

]]>
https://www.ads-software.com/support/topic/help-me-edit-footer-email/ <![CDATA[Help me edit footer email]]> https://www.ads-software.com/support/topic/help-me-edit-footer-email/ Tue, 14 Jun 2022 13:15:01 +0000 ptienhung Replies: 0

Hello everyone!

I want to customize my email my way, so I want to delete the footer in the email but don’t know which file to edit?

Can you guide me how to delete the footer content for me? (as attached picture.)
https://hoimesach.com/images/footer.jpg

Best regards.

]]>
https://www.ads-software.com/support/topic/user-role-limitation-2/ <![CDATA[User role limitation]]> https://www.ads-software.com/support/topic/user-role-limitation-2/ Sat, 28 May 2022 12:44:24 +0000 zarvan Replies: 0

Hello
Thank you so much for this wonderful plugin
I need to define the number of invitations for different user maps. Currently only one number can be assigned to all users.
I wanted to see if it is possible to add this feature? Or help me which file and which part of the plugin should I edit to do this?

]]>
https://www.ads-software.com/support/topic/invited-users-cannot-self-activate/ <![CDATA[Invited users cannot self-activate]]> https://www.ads-software.com/support/topic/invited-users-cannot-self-activate/ Thu, 26 May 2022 18:51:34 +0000 freshpromo Replies: 3

When inviting a new user the process cannot be completed by the user themselves. There appears to be a failure during the activation process.

Steps that work:

– I invite someone from a BuddyBoss Group to join using the Invite Anyone plugin and specifying their email address
– the new user receives the “An invitation to join” email
– user can click the accept link in the email and successfully fills out their password and username details, clicks submit
– user receives the “Activate your account” email with a link that says: To complete the activation of your account, go to the following link.

This is where it fails.

– user clicks that link and tries to login with the info they just created but gets the message: “Your account has not been activated. Check your email for the activation link”
– I’ve tried re-sending the activation link, and the user receives it, but after clicking on it again the login page does not recognize their username/password that they set. It again says the account has not been activated.

Wordpress admins can see this user under Dashboard > Users > Pending and can activate them manually but the new user cannot complete the signup process on their own.

Website is using WordPress 6.0 and the latest version of this plugin and of BuddyBoss Platform and BuddyBoss Platform Pro.

]]>
https://www.ads-software.com/support/topic/mycred-integration-26/ <![CDATA[MyCred integration?]]> https://www.ads-software.com/support/topic/mycred-integration-26/ Sat, 21 May 2022 14:33:00 +0000 pagecrafterz Replies: 0

Hi, any chance INVITE ANYONE is compatible/integrated with myCred to make users get points for referring other users?

]]>
https://www.ads-software.com/support/topic/auto-connect-after-accept-invite/ <![CDATA[Auto connect after accept invite]]> https://www.ads-software.com/support/topic/auto-connect-after-accept-invite/ Tue, 22 Feb 2022 00:06:30 +0000 brickcitylive Replies: 0

When using buddypress/buddyboss, has anyone found a way to automatically connect the invitee with the inviter once the invite is accepted? I’m trying to eliminate a step to streamline the UX. It seems like an unnecessary step to ask them to accept the connection if they have already clicked the link in the email to accept the invite.

]]>
https://www.ads-software.com/support/topic/email-not-loading-2/ <![CDATA[Email not loading]]> https://www.ads-software.com/support/topic/email-not-loading-2/ Wed, 09 Feb 2022 09:54:25 +0000 gnosis87654 Replies: 0

Invitations appear in buddypress. When I hit the send invites the page just resets… no email window appears. Everything is updated to latest version. It works in WP 2022 theme so it appears to be a Themeco Pro-theme. There support says check with you as to why its not working.

]]>
Malaking puwang ng bass splash review Bakit pinapayagan ng pamahalaan ang operasyon ng mga monopolyo How to play Super Ace jili Nice88 club withdrawal Esball online casino com registration Nuebe Gaming legit HB888 Casino real money Casino bonus no deposit free spins 2021 12 Titans Greek mythology online slot machines for real money free play Mines jili login download Allin88 ph login Casino Guru gratis Vegas World login Apanalo online game no deposit bonus 77ph Himala himala wikipedia 啶掂啷嵿ぐ啶ぞ啶?啶曕啶ぞ 啶灌? 啶す 啶囙い啶ㄠぞ 啶栢い啶班え啶距 啶曕啶啶?啶灌啶むぞ 啶灌? Mnl168 online casino register philippines login Bally slot machine value Jili live casino no deposit bonus Gcash gambling reddit philippines tamabetcasino Jili magic lamp app Mwplay888 net download for android Vegas Live Slots hack APK Clive and jill sidequest ffxvi Jiliasia online casino Online bingo jili withdrawal Chili for a crowd Silver Palate Jili168 register philippines Jili mk casino Jili cc download for android Habanero online casino games philippines Philucky withdrawal format 377 jili login register philippines Jili slots download Bsa387 login password Ginto Casino link 49jili login to my account login philippines app Royal777 casino no deposit bonus 8 juli feiertag wikipedia Ano ang mga flash game sa hollywoodbets app download Game of Thrones Slots referral code Igt address manila Zynga slots free coins cheat android Jilicash real money withdrawal Paano gumagana ang mga online slot machine login Ezwin online casino philippines Peso88 login register Jili kaganapan login register Winning plus 8 login philippines masuwerteng iikot ang mga nakakalokang slot 123jili app Login casino games online unblocked Transaction password USDT Baccarat games online real money Appointment slots vs appointment schedule quick hit slots commercial actor Multiclass spell slots table Slot schedule template 啶灌啶曕啶?啶曕ぞ 啶い啷嵿い啶?啶曕た啶むえ啶?啶灌啶むぞ 啶灌 Jili jackpot 777 download for android latest version Million 888 casino login register Tongits go apk unlimited money latest version Pinakamahusay na jili slot game download YE7 Download App BET99 Quebec Free 100 online casino registration facebook page 2021 slots no deposit bonus Online gambling philippines real money Jilibet casino login philippines Super Royal 777 Slots go casino login Register Youtube ng slots today Peso 888 apk Mini777 register download PG gaming casino login Wizard of Oz free coins gamehunters Philippine News today live 247Spin free 100 spin the wizard of oz slots free coins E2 jili casino login Konjac jelly Japan Big bet review korean Online casino Philippines News 7 Juli 2024 memperingati Hari Apa Jili 747 casino login Winph 777 login philippines app benefits of online casino games Wild aces online casino real money Mwcash88 Bonus hunter cc email Maduna clan names FF16 change party members Online casino games real money free spins no deposit Dbx casino real money philippines Okada online casino apk latest version Skype Download for PC Jilibet donnalyn login Register online casino 777 Pub download old version Spaghetti Jollibee price Jili no 1 login register Jiliasia app apk Super slots apk old version 646 casino login Register Philippines Listahan ng laro ng skillz login Totoong online pokies philippines release the kraken clash of the titans (1981) Casinos online real money philippines Phil168 APK Download Chumba Casino login Www 49 jili casino login password Fb jili casino login download apk Jlbet slot login Jili 777 lucky slot login register philippines apk Pagcor logo meaning Hard Rock online casino login 77ph com login password download Ano ang gamot sa mataas ang sugar Online casino download APK Geely Emgrand price Philippines BLBET Tapwin 2024 download apk Lodi 646 casino login ph Royal558 download Abc jili register philippines download LVJILI login Royal fishing jili download for android Free60 casino philippines Kk jili libre 58 real money download PHFUN login Nice88 download free ios Best penny slot machines to play at the casino for beginners portal.pagcor.ph sitemap online casino games no deposit bonus Unlapi AAA Jili login Bongobongo ug Casino Jili x yb download apk do 888 casino register Cash Rush slots 777 apk latest version Free online casino games win real money no deposit Philippines Fortune 888 login password Slots casino login no deposit bonus 49 jili time philippines download Nuebe register login Jili fishing game download free Win99 casino philippines Bingo Super Star download 55bmw win withdrawal Jili kilig login download Superball Keno online Hacksaw slots real money Pagcor address philippines 188 jili demo account hack Vegas online casino games free play Jili 49 net casino login philippines 777 jili jackpot apk latest version Fc slot demo free download Jili under maintenance today download android 3 patti slots patti online play Jili bingo download for android Smbet register philippines Osm jili register mobile number philippines MWGAMING 188 register Nuebe agent login philippines Online casino color games philippines Is Winford Casino open today Jili update today WK777 slot Jili casino review philippines slotomania online Lucky jili slots login register mobile 188 jili casino login download philippines Baccarat game strategy reddit Jili22 promotion How to withdraw in jili slot online 1xslots login Mnl168 online casino register philippines login Paano maglaro ng slot gambling login casino for real money online Best online casino Philippines reddit Jili deposit 50 withdrawal limit Nextbet philippines registration 168jili login registration Www royal888casino net register Double Win Withdrawal App Fisheries department officials 777 Lucky JILI Slots Casino APK download Nz online casino games real money 888php withdrawal Jili mines predictor apk Online casino jackpot slots free play yy777cam Jili one login download mainstream records lee young-ji 77ph com download free 49 jili years login register Jili slot club jackpot 777 download free money philippines Www betvisa games app 1888 jili casino withdrawal online July 10 religious holiday Labet88 login registration 2021 Osm jili casino online games philippines download Money 888 login download Empire slot machine download Ireland online casino games free play Kk jili casino login registration download apk 1000 free games to play with friends Poseidon god son Jili lucky slot app download Big baller club casino login registration philippines Fish Hunter - Shooting Fish Pnp 888 jili slot game login app Limbo game download for PC Highly Compressed Jili jackpot 777 download apk ios slot machine free games free spins deposit bonus Jackpot meter app for android Instant withdrawal betting app Dama N.V. casinos no deposit Bonus Joy 7 casino login free chips Eliakim Sadoki Hadaa Ya Walimwengu Gemdisco login 08 jili register app Jollibee slot casino login philippines register online Award winning chili recipe Allrecipes Helens Slot APK old version Mga kahinaan ng mga pragmatic slot machine login Jili pulang sobre register online Jili777 free 150 no deposit bonus Philippines Jili no 1 com withdrawal philippines Slot online game free real money Jackpot joker jili demo free download Best pg slot game free no download Wagi77 login Philippines Rich9 pinakamainit na laro login Fortune gaming88 login philippines Royal Slot Login Fun facts about July 19th Geely gx3 fiche technique philippines IND slots APK yono Ox jili slot withdrawal What happened on October 7 Al Jazeera 777 pub com login download Nice88 app 99 Fortune Casino login Register Tmtplay888 Jiliplay login download Love jili vip login password 888bet registration online Dragon vs Tiger hack apk Lucky JILI slots login register Kpl casino Online casino game for real money free play 777pub open now promo Video poker jacks or better strategy chart Jili 365 casino login register philippines no deposit bonus download Free slots com party bonus Animal Husbandry Minister Bihar list 188 JILI casino login registration Philippines Anuani ya katibu tawala mkoa wa dar es salaam NetBet registration Fg777 register philippines 90 jili live login download One slot game download Agent GEMDISCO Jili 999 com withdrawal Jilimk casino log in no deposit bonus tg777 login register philippines Pagcor login philippines List of licensed POGO in Philippines 2023 How many cannabinoid receptors are there in the human body Q25 jili download ios Ff777 vip login Jili 49 dot com registration philippines Ano ang speed roulette review Ph joy vip login registration philippines 4 ram slots which ones to use Mga puwang ng video youtube Jackpot Party Instagram free coins www.free facebook.com log in Betvisa download for android 49jili pogcor Betso888 login download Jollibee slot login Fruit Theme Birthday Party Wjslot claim form Nextbet Live Casino Lotto go Jili volatility calculator philippines Teenage Kraken Salish Matter Lucky 777 online casino login philippines Slotomania 777 casino real money Mega ace jili demo apk latest version Falcon Play customer service www.666.com games Bingo Jili PH Slots earning app real money no deposit Canara Bank Internet banking PIN generation 8K8 vip login Philippines No 1 jili app for android free download Gonzo's Quest max win 9 Pots of Gold land and win What does Mr Mike Slots do for a living Jili fc slot real money no deposit bonus Ph macao jili register download limbo apk + obb download Swcup6 net live login Register philippines Free slots 8888 no deposit philippines Jili tadhana slots download free Free casino slots 3 lines no download Jili okbet real money philippines Jili88 ph com register login password Slots earning app real money download Jili apps download free for android ios Kurdish traditional dress Labet88 online casino Ez jili telegram ios 94067 water heater door installation Real Boxing 3 download Best casino online Wishbone Games Nextbet login mobile registration Jili no 2 login no deposit bonus Poder Judicial Superace88 club login registration link Triple match 3d master mod apk Sino ang cowboy slots wife Jili 5678 casino login poker star Apanalo casino app login KK JILI casino login app apk Www gibson casino www gibsoncasino com login APEX slot download Best free slot machines play for free no deposit Mining Telegram group link Jili t7 real money Jili369 app download Progressive jackpot meter link Lampara ng genie philippines Best free slots with bonus Asia JILI casino register 888 ladies slots login UNO Spin Millionaire Dimm slots reddit King game app download apk Yy777 index login No deposit slots real money Yeriko by injili bora choir session 49 jili road register philippines Jili slot 777 login register online no deposit bonus philippines 啶啶?啶曕 啶啶班が啶?啶曕ぐ啶ㄠ 啶曕 啶夃お啶距く GGBet welcome bonus Is the 49ers coach a Christian Sino ang may akda ng medusa Ace Super ph casino Login games.747 games.ph/launchgame open now Tiktok video Zili 7 Gold Fruits slot Peraplay APK download Labet88 register philippines app Love jili vip login philippines Slots download free Jili slot jackpot login register Junglee Rummy APK Paddy power virtue Welke dag is het vandaag in belgie Nn777 login philippines app Pb777 login id and password free Sweet Bonanza free spins no deposit Online slots casino 888 real money no deposit online casino games real money Osm jili casino Megaways slots login Konami free slots no download Big Bass Hold and Spinner Megaways demo Jili 888 register Jili mines download free Best free video poker no download fishing slot casino - free 100 000 coins Jili22 NEW com register Big Bass Bonanza Geely subsidiaries in philippines State fish of bihar in english Game of Thrones Slots Casino free coins hack Lucky jili casino login registration philippines apk Mga laro ng slot na nagbabayad ng totoong pera apk Niceph casino real money Fortune Dragon PG slot demo Reference generator Jili88ph net register download FG7777 Jili super win apk best online casino games to win money Bagong jili register app 777sm vip login Jl bet slot register Jili casino sign up bonus no deposit philippines Phlove Casino Login Register Jili slot online real money Ez jili code free download Cannabinoids structure How does Dragon Link slot work 188 jili casino download free Which casino has the most winners in Vegas Goldfish slots apk Fisheries, Bihar gov in Medusa megaways real money Mwcash88 casino login Best time to play crazy time reddit Voslot jili register philippines Ang tao ba ay nagmula sa unggoy PHL63 login register Demo Jili Golden Empire Download app and get bonus Pogibet free 100 philippines 22FUN APK Lucky JILI Casino login registration Win win Game zambia online app download Win100 com casino group win100 originals win100 originals register Mlbb Win Rate Calculator APK Mi777 casino login philippines register Do888 casino login no deposit bonus Jill Scott net worth 8 jili slot download for android 55X Casino Login Register Philippines Ug777 app download apk for android 94067 water heater door replacement Loveph casino Tianjin University of Science and Technology How to play Fortune Gems online Earn money online Philippines legit Xo jili com register philippines Cruise casino in Goa Play slot machines for free online no deposit Is golden Cowboy good tds online casino games volatility Tmtplay casino login register mobile 啶戉え啶侧ぞ啶囙え 啶曕啶膏啶ㄠ 啶椸啶?啶曕啶膏 啶栢啶侧啶? EZJILI Login Register Game room online casino games real money Casino dealer Reddit ph Slots jackpot meter philippines app Pldt 777 real money withdrawal Jackpot World redeem code free 2024 Jilibay free 68 no deposit bonus Bet88 ph app download for android OKBet rewards app Julie emergency contraception reviews 啶ぞ啶椸啶?啶う啶侧え啷?啶曕ぞ 啶膏す啶?啶夃お啶距く Mega win login Best online casino games real money app Jiliasia ace download Jili 178 real money app Pag-IBIG membership Double DaVinci Diamonds free slot game jili 711 Slot virtual real money free Jili tongits withdrawal limit Okbet casino login philippines download Sabong derby 2023 Full Video MONOPOLY Slots download White part of eye swollen like jelly home remedies Ez jili codes 2021 Wjslot com rewards login How many evolutions can you have in a deck Clash Royale Online casino jili login register House of Fun VIP PLUS download SM Megamall 3 day sale 2024 dates Phil163 login Simple chili recipe Jili slot machine apk latest version Jili188 login download Boss88 Slot Login Jili go login philippines Online casino games with free signup bonus philippines Jili mines download apk Fc slot online philippines Y777 jili real money withdrawal Win99 online casino login register Lucky jili slots login register mobile philippines BetVictor UK Jilino1 new site Jili no minimum deposit philippines 2020 Royal777 login register philippines Forgot transaction password in phdream Casino plus jili slot real money Win99 slot games free apk Nn777 slot jili real money 38jili login GO Keyboard APK betBonanza mobile login registration Dragon cash vs Dragon Link 8k8 online casino games downloadable content philippines Best slots to play on FanDuel reddit balato8aa Crown89ph casino login Online casino builder Wjevo22 app irich slots&games casino 777 Boxing king casino real money Jili22 vip202 download online casino games with no minimum deposit Mega Wheel game download Jili apps download for android free Diablo 4 enchantment slot not working Online lucky sweepstakes no deposit bonus 747 online casino games philippines Super ace demo game online free Spin and win cash in Uganda withdrawal PG Soft Wild Bounty Showdown 777sky slot Jiliapp download latest version Www royal888casino net register Royal slots real money login ????? ?? ???? ??? ???? ????? ????? Phkuya com casino login PHIL168 new link Royal888casino net withdrawal July 8, 2024 Casino machine Jili lucky slot app apk Pragmatikong laro ng big bass bonanza videos 200jili download latest version Dometic 94067 Online slot machines philippines 12 Titans Greek mythology Online slots strategy Casinos online slots real money Jili official website app for android Play tongits online real money philippines Bmy88 net login password Jili 646 ph register app ios Kumuha ng jili app login download Ezjili com download ios Mega Ace mechanics Jili ace 777 no deposit bonus Jili live club login Jili 747 login app 291 jili 01 register download Tongits Go new version Boss JILI casino login Rich711 casino login download 9jlbet Real money casino app apk Jili event login app Jackpot fishing jili download free Pagsasalin ng teksto Sixers game today Please complete the required turnover for withdrawal tagalog Majhail X song download Mp3 April 8 2024 holiday Philippines Pg777 login register online Crazy Time prediction telegram Tadhana slots apk download old version Transaction password in scatter example Mine (Taylor Swift release date) Jili zeus slot login register International casino app Monopolyo ng big baller login Win888pub app Diablo 4 enchantments Phmacau club 啶す啶苦啶︵啶班ぞ 啶溹啶む 啶曕 啶啶∴ Apat na uri ng tunggalian at halimbawa Sw888 casino register BYU portal 49 jili vip login philippines Ubet95 Casino login Jili 178 ph register Is online gambling legal in Philippines Jili t7 login registration form Fg777 official withdrawal How to get unlimited coins on Vegas Live Slots Go88 slot login register download Slot sites philippines Pnxbet77 legit Online lucky 9 gcash download bwinners - online sports betting virtual & casino games Fachai free 150 Casino table games inside (2008) Ocean King Jackpot download Boom casino login KK JILI Casino Login app apk Nexusgaming88 agent login philippines Bonus 365 casino login Free unlimited bingo card generator PDF Microsoft login Jill meaning slang origin Grand slot Palace online casino W888 login Jili369 real money login Nexus88 Gaming login register Jackpot fishing demo free download Jajji veer punjabi gane mp3 download online casino games not real money Wagi 777 download for android free spins bonus no deposit Best casino online slots europe Bombing Fishing demo Limbo bar game Lodigame 291 login registration philippines Mammoth Gold Megaways Peraplay login Fb jili casino login download free no deposit bonus Bingo filipino machine price Login slot machine app Nextbet app download apk Slots game machine free Is DraftKings Casino legal in Massachusetts Webcam app Free unlimited bingo card generator What do CB1 receptors do 177bet cc download Jiliasia casino login philippines Online lucky 9 gcash withdrawal KK JILI register Slots rivals ladbrokes login Jilivip download ios online casino games in florida slot o pol online Jl777 Login Register Charge Buffalo free play Lucky Tongits gcash download Ph646 register mobile philippines Promotion 100 free 58jili login registration online x570 ram slots Mines predictor free Jili17 register mobile Kkjili com app download latest version Best free bonus slots real money Gba 777 casino no deposit bonus Best slots to buy bonus GGBET GCash Wild hammer megaways apk Real money gambling games philippines Jiliko photos free Libreng mga laro ng slot online register MVG SunBet login Bet777 Login Casino keno games free online no deposit Casino ng rainbow riches real money Jili referencing indian law ppt Free casino online real money Philboss link login Jili slot 777 login register online philippines Premiumbets TG777 app login 10 07 day Pocket GK Book PDF in Hindi Online casino 50 cash in no deposit Free slots paypal deposit Phlwin online casino hash encryption games traceable fair casino apk casino game casino Jili188 tv login password 5e sorcerer spell slots guide Alamat ng wizarding wars reddit Jili slot jackpot 777 withdrawal Www jilino1 club app Betso89 register Free website browser download pagcor online casino games Poker machines games casinos online free bonus Play video poker free no download for android Is Seybold journal Scopus Indexed How to withdraw in jili online gcash mwplay888.net login Phpslot app apk Top 1 game in the world 2024 Bingo plus pagcor login password 178jili HP777 Casino Jili day app apk Casino guru Brazil nuebegamingslot Jili casino app login download Jili 09 register download taylor swift july 9th 1:38 Geely Coolray 2024 Release date Philippines Jollibee picture outside Xo jili casino login register mobile Spielautomaten kaufen Royal Club apk Mod Helens gogo jili login register philippines Lucky 777 apk latest version Katangian ni apollo sa cupid at psyche Doble Engineering Casino jili real money app Slot machine png Falcon casino login register 5e multiclass spell slots Arcane Trickster Jili slot jackpot app download Paano maglaro ng slot para kumita withdrawal casino slot games real money Helens gogo jili register philippines Casino articles topics Fachai free 100 Slot 50 minimum deposit Philippines sm 3-day sale schedule 2024 Magic jili slot game login Are casino Apps rigged Tala888 download jackpotfree Big bet review guardian online casino games for free Fg777 casino login register link Betvisa best online casino Microsoft Store download lodivip3web Jili 789 download Best online casino games for real cash Tongits go 4.1 6 apk download latest version Gba333 login Register Phone club Game online azure pre-validated domain Sabong app apk Bandit Slots Youtube Jacks or Better strategy app Magandang slot ba ang Sweet Bonanza? 100 free spins no deposit no wagering requirements philippines Fg777win com login Pci slot types explained Nakakabuti ba ang sugal sa tao Tmtplay casino login register mobile Galaxy 88 casino com login register Free flash video poker download no download Winford Online casino login JIL pastor Winhq9 login register mobile W500 one Jili veo casino login registration Buenas 88 Register How to withdraw 90 jili club philippines online Jili free 100 php no deposit bonus philippines Jili com casino register Minecraft Crazy games Mitran de boot remix mp3 song download 320kbps Anjeer Dry fruit tg777 customer service 24/7 Arat365 com login Apps na pwedeng kumita ng pera legit 9k slot Casino Jili 8888 download for android William Hill live Tesla jili login philippines 啶す啶苦啶︵啶班ぞ 啶溹啶む x7-16 啶啶侧啶? Okada Online Casino download ios Lucky Neko demo play Jili lucky download for pc Original Buffalo wings recipe 777 jili Casino real money Betsson Group Glassdoor 40 jili casino login philippines app 777ku login App Byu jili register download Yesjili com login philippines Jackpot fishing game real money Ubet95 app apk 888 casino app store download Betway zambia online live sports betting download jili 80 iRich kh free download Mga nakakatawang palaro Top online slots online lucky 777 slot game download 50 deposit game online 49 jili games Online casino game with real money Freeplay Casino no deposit bonus Jili 646 777 login register philippines link Kk jili login register online philippines Anti epidemic online casino gcash login Gold 168 Casino login Royal777 register JILI6 promo code Philippines Lodislot 777 casino online real money Ijility maumelle ar Mnl168 download for android Bet 888 login philippines Boeing Secure Login 188 JILI Casino login Jili asya download Mr joker Photo Dinosaur tycoon jili ios download Jili777 login register Philippines 49 jili games download Wow888one philippines Phl63one philippines Mega Medusa Casino login Win888 casino register online Pldt 777 real money withdrawal solaire online casino games MNL63 free 100 No Deposit Jili caishen casino irich slots&games casino 777 Free slots poker online real money Casinos online for real money philippines Royal Club login app download free Online casino free real money DO888 online casino JILI188 app Charge buffalo jili download free Jili free 100 no turnover philippines no deposit bonus Gogosolot online Casino Login Superjilli ph Jili365 bet login sign up philippines Jili x super ace download 5 jili casino login register online Lolliplay login no deposit bonus Pldt jili slot download ios New online casino free chip no deposit Is transaction password and atm pin same sbi mega joker spielautomat Baccarat Strategy book Sweet Bonanza Candyland live Jili 337 withdrawal fee Baccarat Evolution Jili games download for pc slots with real money online 5jl Casino Login Super Ace slot demo SWERTRES sureball hearing today Philippines youtube Jili big win login register Online casino games no deposit free spins philippines Top online slots online lucky 777 slot game download Big baller Club info login Non working holiday Pasig 45 days from july 9, 2024 777 10 jili casino register download jackpot giant slot 90 jili register download JL777 Casino Tp777 com login register mobile Casino tr c tuy n login Gogo jili app download apk mod Legends Slot Bingo JILI 52 Club APK Jilievo888 com login register online Lucky jili real money 888bets mozambique app download Happy jackpot slots Fairground Slots no deposit bonus Wild ace demo download New Vegas slots luck Casino mania bonus Huff and more Puff slot machine for sale baccarat game how to play Jili ph register online Jolibet withdrawal Football teams Premier League sissi slot machine free play Jili vip login register philippines download app ios Transaction password in tagalog example brainly Play free casino games online without downloading for android ELK casino games Libreng computer video poker download Winph6aa philippines Jlbetslot 49 jili casino slots login Jili app casino download apk for android Mnl168 online casino register philippines apk Jili 80 login register Jili free withdrawal app Maaari ba tayong maglaro ng monopoly online play SYNOT Interactive Playzone cashback labet88.com app Jili49 login register Jili asia com casino login download Gold slots casino sa facebook login Jili balita withdrawal fee Gamezy Rummy Jili day register online 90jili game club download PH Macao game 777sky casino philippines Ibetph web casino Best online casino games philippines gcash 247 slots login Elf bingo jili online registration Funny captions for online casino games 777 lucky slot no deposit bonus OKBet App download apk Z25 Gaming P88 jili login app Jili77win philippines DuckyLuck Casino Ttjl casino link app 55jili login Cali 777 com login password LIMBO APK download latest version 200jili login philippines 646 jili 01 login app FB JILI Login Golden Wealth Baccarat live Panaloka login registration Tala0888 download apk GemDisco Login register Lion dance history Ezjili login register mobile Royal777 register Jili 337 login register philippines download Fishing era poppo How to play jackpot fishing app Libreng jili games login Swerte ng buto 77ph1 com login password How do i install tongits go on android Joy jili casino login register philippines free chips Slot machine 777 login Jili online slot apk Jili ko o casino login register APK injector Slot Pragmatic Play Gogo JILI Casino login 50 minimum Z790 ram slots for gaming Tongits Go update download How to compute special non working holiday Philippines 777 Casino 77 free spins login MWGAMING Login Password How to play taya 777 online How does Lee Young ji know English Phdream88 login app 63jili download ios ME777 Casino Login Philippines Baba Slots online casinoplusslot How to play jili super ace online Unibet sign up bonus 60 jili login download no deposit bonus Philippine online casino no deposit bonus pxbetgamingslot Online casino games that pay real money no deposit 49jili flag login password Jili 2024 login register Paano maglaro ng jili super ace login download Vip jili login philippines app Jili bingo download for android 9Y game City Jili jackpot lucky casino real money no deposit bonus Easy money jackpot fishing philippines Casino free games slots machine no deposit Slots7 Casino free spins Winjili ph login registration Jili games free 100 download apk Jiliplay999 com login Hot chilli megaways review Jili games apk latest version ang mga slot ay nagsusugal Nice 888 login philippines Playzone Casino FC jackpot Casino login Spin jackpot YONO apk Juegos de casino gratis sin descargar ni registrarse Gold slots casino sa facebook withdrawal Jili 168 login registration link Mitran De Junction Te Mp3 Song Download pagalworld Lovejili app for android apk download Helens gogo jili casino login Transaction password in scatter example mainit na jili casino Casino online free credit no deposit How do i install tongits go on iphone Boombet casino 100 JILI casino no deposit bonus Peso88aa philippines Jiliko gcash withdrawal Jili veo login philippines Jili slot game download apk latest version Macau casino online login philippines online casino Katangian ni sita sa rama at sita 49jili login to my account philippines app Forgot transaction password Fg777app download Baccarat in casino online 98 jili casino login register philippines download app Marvelbet apps download apk for android Xo jili app login Speed roulette strategy betway zambia live soccer online casino games Casino 777 lucky jili slots real money yakuza: like a dragon slots high payout token Wild Coaster PG slot Turkish Airlines flights Bet jili app download for iphone Why do slot machines have bingo cards Ez jili code philippines DOUBLE Jackpot Slot MACHINE for sale play free online casino games Bet777 Login app Supabets mobile app download Winning plus 40 apk Play top Dollar slot machine online free no download Jackpot meter jili download apk Plot 777 casino login register link Best time to play jili slot on sunday reddit