function profile2_regpath_regpath_delete in Profile2 Registration Path 7.2
Same name and namespace in other branches
- 7 profile2_regpath.module \profile2_regpath_regpath_delete()
Delete a regpath.
File
- ./
profile2_regpath.module, line 356 - Attach profile2 form to registration form according to path.
Code
function profile2_regpath_regpath_delete($regpath) {
// Prevent "Call to undefined function ctools_include()" error
module_load_include('module', 'ctools', 'ctools');
$profile_type = is_object($regpath) ? $regpath->profile_type : $regpath;
db_query('DELETE FROM {profile2_regpath} WHERE profile_type=:profile_type', array(
':profile_type' => $profile_type,
));
// Clear the Ctools export API cache.
ctools_include('export');
ctools_export_load_object_reset('profile2_regpath');
}