You are here

multiple_registration.install in Multiple Registration 7

Same filename and directory in other branches
  1. 8.2 multiple_registration.install
  2. 3.x multiple_registration.install

Installation file multiple_registration.

File

multiple_registration.install
View source
<?php

/**
 * @file
 * Installation file multiple_registration.
 */

/**
 * Implements hook_uninstall().
 */
function multiple_registration_uninstall() {
  $roles = user_roles();
  ksort($roles);

  // Include only custom created roles.
  $allowed_roles = array_keys(array_slice($roles, 3, NULL, TRUE));
  if ($allowed_roles) {
    foreach ($allowed_roles as $rid) {
      if ($source = variable_get('multiple_registration_url_' . $rid, '')) {
        db_delete('url_alias')
          ->condition('source', $source)
          ->execute();
        variable_del('multiple_registration_url_registration_path_' . $rid);
        variable_del('multiple_registration_url_' . $rid);
      }
    }
  }
}

Functions