BuddyPress: Allow only one email domain to register

Finally, I found the solution. Here is the code if anyone has the same issue and want to refer it. Using Action function wf_validate_email_domain() { global $bp; $email = $bp->signup->email; $email_exploded = explode(‘@’, $email); // split on @ and return last value of array (the domain) $domain = array_pop($email_exploded); $email_domains = get_option(‘allowed_email_domains’); $allowed_email_domains = array_map(‘trim’, … Read more

How to hide admin account in BuddyPress? (for security reasons)

I found this: Exclude Users from Members directory on a BuddyPress based social network We will need to hook to ‘bp_ajax_querystring’ filter. The following code will allow to exclude the users from the members directory. They will be still listed in the friends list of other users with whom they are friends with. add_action(‘bp_ajax_querystring’,’bpdev_exclude_users’,20,2); function … Read more

Can’t get a custom template taxonomy page to display

I found this code; function ftc_flush_rewrites() { global $wp_rewrite; $wp_rewrite->flush_rules(); } function ftc_add_rewrites() { global $wp_rewrite; $ftc_new_non_wp_rules = array( ‘find/(this)’ => ‘/addit.php?here=$1’, ); $wp_rewrite->non_wp_rules = $ftc_new_non_wp_rules + $wp_rewrite->non_wp_rules; } add_action(‘generate_rewrite_rules’, ‘ftc_add_rewrites’); add_action(‘admin_init’, ‘ftc_flush_rewrites’); in this thread http://wordpress.org/support/topic/writing-wp_rewrite-gtnon_wp_rules-to-htaccess …not sure if that addresses the problem but good luck!

How to get a buddypress user profile link and a certain user profile field for the current post author?

For an author’s profile link, use bp_core_get_user_domain( $user_id ) to get the URL, and bp_core_get_userlink( $user_id ) to get an HTML link element, including display name. For the xprofile data, use xprofile_get_field_data( $field, $user_id ) $field can be either the name of the field (like ‘Biography’) or the numerical field id.