'user'))->fetchField(); db_update('system') ->fields(array('weight' => $weight + 3)) ->condition('name', 'smart_ip_ban', '=') ->condition('type', 'module') ->execute(); $field = array( 'description' => 'Name of the module that blocked the IP. Used by Smart IP Ban.', 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ); db_add_field('blocked_ips', 'agent', $field); } /** * Implements hook_uninstall() */ function smart_ip_ban_uninstall() { $variables = array( 'smart_ip_ban_threshold', 'smart_ip_ban_interval', 'smart_ip_ban_duration', 'smart_ip_ban_excluded_ip', 'user_failed_login_ip_limit', 'user_failed_login_ip_window' ); foreach ($variables as $variable) { variable_del($variable); } db_drop_field('blocked_ips', 'agent'); }