function profile2_regpath_get_profile_id in Profile2 Registration Path 7
Same name and namespace in other branches
- 7.2 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.
2 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.
File
- ./
profile2_regpath.module, line 187 - 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;
}