Skip to:
Content
Pages
Categories
Search
Top
Bottom
Codex HomeAdministrator Guide → Alternative Registration Workflows

Alternative Registration Workflows

We are currently working on a documentation reboot, here’s the new home of the best accurate docs (WIP). You’re very welcome to contribute to it.

Updated documentation for this section is available here.

By default, registration in BuddyPress follows this workflow:

A site administrator can enable registration by checking “Anyone can register” on the WP Admin > Settings > General options screen.

WordPress' General Setting screen with the "Membership" option highlighted.

If registration is enabled, then site visitors can sign up for an account using the registration form.

Once the registration form has been submitted, the user will be sent an activation email that verifies that the user’s email address is legitimate.

Once the user activates her account, she will be able to login using the username and password she specified on the registration form.

Changing the Registration Process

You can change the default BP registration flow by allowing member invitations and/or requiring membership requests. These features can be used separately or together to change who is allowed to join your site.

Invitations

Invitations can be used when public registration is open to help grow your site’s membership or when public registration is closed to only allow membership by referral from an existing member.

Enable membership invitations by visiting the WP Admin > Settings > BuddyPress > Options screen.

BuddyPress options screen with the invitations option highlighted.

Your site members can send invitations from their user profiles.

The send invitation form on a user's profile.

The invited member will receive an email containing a link to the registration form.

The invitation email received from the BuddyPress site.

Even if you have disabled public registration, valid invitation holders will be able to access the form using the link in the email.

The BuddyPress site's registration form, modified for invitation acceptance.

Once the user registers, the account will be activated immediately (responding to the invitation has already verified the user’s email address) and will be able to log in to the site.

The success message received after accepting an invitation.

Membership Requests (available in BuddyPress 10)

Enabling membership requests interrupts the registration process by preventing the activation email from being sent automatically, and instead requires that a site administrator manually review and approve each account request.

Enable membership requests by visiting the WP Admin > Settings > BuddyPress > Options screen. Note that public registration must be disabled for requests to be activated.

The BuddyPress options screen with the "Membership Requests" option highlighted.

Then, visitors will be able to visit the registration form to submit a membership request.

The BuddyPress site's registration form modified to accept membership requests.

When a new request is submitted, the site admins will receive a site notifications and an email. The email can be disabled via the user’s email preferences screen.

A site admin's notifications screen, with a new membership request notification highlighted.
The email message that a BuddyPress site admin receives when a new request is submitted.
The email message that a BuddyPress site admin receives when a new request is submitted.

The link in the email or site notification will take the administrator to an approval screen where she can review the submitted membership request and choose to confirm it.

The WP Admin screen used to approve a single membership request.

The administrator can also visit the Manage Pending Memberships screen at WP Admin > Users > Manage Pending Memberships.

The WP Admin screen used to manage membership requests, with the active navigation item highlighted.

Hovering over a row will reveal the following actions available to the admin:

If the administrator approves the request, the submitter will receive an activation email and can complete their registration.

The activation email sent to a request submitter upon approval by an administrator.

If the administrator deletes the request, the submitter will receive an email telling them that their request has been declined.

The email sent to a request submitter upon deletion by an administrator.

Membership Requests – Automatically approving some membership requests.

There are cases where every user that satisfies some criteria should be granted access immediately and not require manual approval. For example, if you are building a site for students and staff at a specific school, you might want to approve every request that comes in from any user with a my-school.edu email address. You can do this by adding a filter like the following to your bp-custom.php file or your theme’s functions.php file:

<?php 
/**
 * If a user submits a site membership request, but has a
 * 'my-school.edu' email address, bypass the manual approval of the request.
 *
 * @param bool  $send    Whether or not this membership request should be approved
 *                       immediately and the activation email sent.
 *                       Default is `false` meaning that the request should be
 *                       manually approved by a site admin.
 * @param array $details The details of the request.
 */
function bpcodex_auto_approve_some_requests( $send, $details ) {
	// We'll need the prospective user's email address.
	if ( empty( $details['user_email'] ) ) {
		return $send;
	}

	$email_parts = explode( '@', $details['user_email'] );

	// If the email address is one of ours, approve the request.
	if ( ! empty( $email_parts[1] ) && 'my-school.edu' === $email_parts[1] ) {
		$send = true;
	}

	return $send;
}
add_filter( 'bp_members_membership_requests_bypass_manual_approval', 'bpcodex_auto_approve_some_requests', 10, 2 );

Skip to toolbar