Skip to:

Profile creation both as individual and organization member

  • Profile photo of Rene Salgado
    Rene Salgado


    In Facebook one may register as an individual member, and then without leaving the site, register as a member of an organization or institution (here is the link, ) and then switch to one or other type of membership without leaving the site.

    Is this capability provided by out-of-the-box BPress, or you would have to register as an individual and, should you want to register as a member of an institution or organization as well, exit the site and then reenter to register as an organization member? (In other words, does BP offer -or not- similar membership siwtching within the site as Facebook ?).

    If your response is no, has any one worked on such a task and is willing to share/post the relevant snippets?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Profile photo of Boone Gorges
    Boone Gorges


    I had to do this recently. Here’s a few hints.

    – First, you have to create an interface for changing the usermeta in question. Here’s a simple example, where I added a dropdown to the WP Dashboard Edit User page. the dropdown contains the options “Teacher” and “Student”, and when the profile is saved, the account type is stored in the wp_usermeta table, keyed as ‘acct_type’. (You’ll notice that I’ve only made it available to blog admins – you can change that if you want) You could just as easily store this information as a piece of BP xprofile data, which has the advantage that you don’t need to worry about the functions for creating the dropdown UI or storing the data on the page. In that case, just add a profile field at Dashboard > BuddyPress > Profile Field Setup
    – Then you’ll need a utility function that you can use in your theme templates to check which account type you’re dealing with, and then to display different stuff depending on the account type. Here’s an example from the same project, where I’m checking whether the *logged in* user is a teacher. If you’re dealing with xprofile data rather than usermeta, you’ll have to use the xprofile tags instead (see especially xprofile_get_field_data() in bp-xprofile/bp-xprofile-templatetags.php). And if you want to check whether the *displayed* user meets a certain criterion (as opposed to the *logged in* user, just call the $bp global (instead of $current_user) and set $user_id = $bp->displayed_user->id (see for more details on $bp).

    At that point, you can differentiate between the content shown to/about one account type by using conditionals, eg if ( bbg_is_teacher ) { /*blah blah blah*/ } else { /*blah blah blah*/ }. This can happen mostly at the template level.

    Good luck!

    Profile photo of meetvora2006


    i exactly want same as @renegaebd described in this article. i want individual can register him self as organisation as well it show in all organisation page in my website. any kind of help??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Profile creation both as individual and organization member’ is closed to new replies.