How to Create Multiple User Account Types for BuddyPress

Not every user is the same! The reasons people become members of social networks are as varied as the members themselves. Users interact with your site in different ways and it’s important to be able to categorize them.

Multiple user types can expand the types of social networks that you are able to build with BuddyPress. In this tutorial we’ll cover how to build multiple user account types into your registration process.

1. Install and activate the Buddypress User Account Types plugin.

Buddypress User Account Types is a plugin that I had been wishing for a couple of years ago and was really excited to see it hit the repository. It gives you the capability to create multiple user types and user directories for each.

2. Configure Account Types

Once the plugin is installed, you’ll need to create a new profile field for your user types. Go to Dashboard >> BuddyPress >> Profile Fields. Create a new required profile item with a drop down select box.

3. Assign the field for the account type in the plugin’s settings.

The next step is to go to BuddyPress >> User Account Type and assign the field you created for the account type drop down.

Once you set the account type field, you’ll be presented with the shortcodes for creating the different user directories. Here’s an example:

[bp_user_account_type type="Staff"] , [bp_user_account_type type="Student"] , [bp_user_account_type type="Teacher"]

You’ll need these shortcodes for the next step.

4. Create the user directories.

If you want to create a directory for a specific user type, simply paste the shortcode into a new page. You may need to do a little CSS adjusting to your theme to make it fit in, but it should look something like this:

That’s all there is to it! As you can see the plugin does most of the work. If you find creative ways to extend this, please let us know in the comments. This plugin is an exciting new tool for communities that were previously limited by having only one user type.

I was inspired by a tweet I saw last night from BuddyPress core developer John James Jacoby:

The BuddyPress User Account Type plugin is one tool that makes it possible to build these niche social networks. BuddyPress has a bright future ahead in 2012 and a lot of exciting enhancements are going to be coming down the pipe.

Even if you’re not using this plugin on a site right now, it’s helpful to know that it’s possible to quickly create multiple account types. You may want to bookmark this page for the future. Make sure you’re subscribed to our blog for all the latest updates on new and useful BuddyPress plugins.

Tags

Comments (7)

  1. It would be nice if a user could choose their type and have different capabilities within the community. For instance, certain users could control the calendar for the community, or have a blog, or a different looking profile. This has potential, but it appears to just give the user a label.

  2. I would like to display the persons company name field instead of the username when I add the short code to a page. Is there a way I can make this happen? Thanks!!

  3. Am not sure if this has been done or not. I have added the user account types. Now I want to make groups visible/hidden to the right user. So like the Buddypress Group called Staff Room. This would not be shown to any of the students. Its because I want to have business related groups that are not shown to members of the site that are not in that field.

Participate