function profile2_regpath_get_profile_id in Profile2 Registration Path 7.2
Same name and namespace in other branches
- 7 profile2_regpath.module \profile2_regpath_get_profile_id()
Provides profile_id by profile machine_name.
Parameters
string $profile_type: Machine-name of profile2 profile type.
Return value
string The profile id for indicated profile type.
3 calls to profile2_regpath_get_profile_id()
- Profile2RegpathAccessTest::setUp in tests/
Profile2RegpathAccessTest.test - Sets up a Drupal site for running functional and integration tests.
- profile2_regpath_save_settings in ./
profile2_regpath.admin.inc - Helper function to save profile settings.
- _profile2_regpath_form_profile2_type_form_alter in ./
profile2_regpath.admin.inc - Implements hook_form_FORM_ID_alter() for the registration form.
File
- ./
profile2_regpath.module, line 213 - Attach profile2 form to registration form according to path.
Code
function profile2_regpath_get_profile_id($profile_type) {
$profile_id = db_query("SELECT id FROM {profile_type} WHERE type = :profile_type", array(
':profile_type' => $profile_type,
))
->fetchField();
return $profile_id;
}