You are here

function _multiple_registration_remove_page in Multiple Registration 7

Removes registering page for role.

Parameters

int $rid: User role Id.

1 call to _multiple_registration_remove_page()
multiple_registration_remove_registration_form_submit in ./multiple_registration.module
Submit function for multiple_registration_remove_registration_form.

File

./multiple_registration.module, line 380
Add ability to create several registration pages.

Code

function _multiple_registration_remove_page($rid) {
  if (variable_get('multiple_registration_url_' . $rid, '')) {
    _multiple_registration_remove_page_alias($rid);
    variable_del('multiple_registration_path_' . $rid);
    variable_del('multiple_registration_url_' . $rid);
    drupal_set_message(t('Registration page has been removed.'));
  }
  else {
    drupal_set_message(t('Registration page has not been removed. There are no pages for this role.'), 'error');
  }
}