You are here

function gprofile_load in Group 7

Load a group member profile.

Parameters

int $gid: The group id to load the profile for.

int $uid: The user id to load the profile for.

string $type: The profile type to load.

Return value

GProfile The loaded GProfile entity.

1 call to gprofile_load()
gprofile_form_group_membership_form_alter in modules/gprofile/gprofile.module
Implements hook_form_FORM_ID_alter().

File

modules/gprofile/helpers/gprofile.entity.inc, line 37
Entity API related helper functions for group member profiles.

Code

function gprofile_load($gid, $uid, $type) {
  if ($group_membership = group_membership_load($gid, $uid)) {
    $profiles = gprofile_load_by_member($group_membership->mid, $type);
    return reset($profiles);
  }
}