You are here

function profile2_regpath_get_profile_label in Profile2 Registration Path 7.2

Same name and namespace in other branches
  1. 7 profile2_regpath.module \profile2_regpath_get_profile_label()

Provides label by profile machine_name.

Parameters

string $profile_type: Machine-name of profile2 profile type.

Return value

string The label for indicated profile type.

File

./profile2_regpath.module, line 283
Attach profile2 form to registration form according to path.

Code

function profile2_regpath_get_profile_label($profile_type) {
  $profile_label = db_query("SELECT label FROM {profile_type} WHERE type = :profile_type", array(
    ':profile_type' => $profile_type,
  ))
    ->fetchField();
  return $profile_label;
}