You are here

function _certificate_get_user_profile in Certificate 6

Helper function to match template to certificate type.

@TODO: this currently assumes the content profile is of type 'profile'. We'll want to make that configurable (later).

Return value

The content profile node object.

1 call to _certificate_get_user_profile()
certificate_single in ./certificate.pages.inc
Generate a single certificate.

File

./certificate.module, line 345
Certificate module.

Code

function _certificate_get_user_profile($account) {
  $uid = $account->uid;

  // Curently we're using only using content-profile for this feature.
  if (module_exists('content_profile')) {
    $profile = content_profile_load('profile', $uid);
    return $profile;
  }
  return FALSE;
}