You are here

auth0.install in Auth0 Single Sign On 7.2

Same filename and directory in other branches
  1. 8.2 auth0.install
  2. 8 auth0.install

Installation file for the auth0 module.

File

auth0.install
View source
<?php

/**
 * @file
 * Installation file for the auth0 module.
 */

/**
 * Implements hook_schema().
 */
function auth0_schema() {
  $schema['auth0_user'] = array(
    'description' => 'Joins auth0 users with drupal users.',
    'fields' => array(
      'auth0_id' => array(
        'description' => 'The user id on auth0',
        'type' => 'varchar',
        'length' => 100,
        'not null' => TRUE,
      ),
      'drupal_id' => array(
        'description' => 'The user id on drupal',
        'type' => 'int',
        'not null' => TRUE,
      ),
      'auth0_object' => array(
        'description' => 'A serialized version of the auth0 user',
        'type' => 'text',
        'not null' => TRUE,
      ),
    ),
    'indexes' => array(
      'drupal_id' => array(
        'drupal_id',
      ),
    ),
    'primary key' => array(
      'auth0_id',
    ),
  );
  return $schema;
}

/**
 * Implements hook_uninstall().
 */
function auth0_uninstall() {
  variable_del('auth0_login_css');
  variable_del('auth0_widget_cdn');
  variable_del('auth0_form_title');
  variable_del('auth0_requires_verified_email');
  variable_del('auth0_allow_signup');
  variable_del('auth0_domain');
  variable_del('auth0_client_id');
  variable_del('auth0_client_secret');
}

Functions

Namesort descending Description
auth0_schema Implements hook_schema().
auth0_uninstall Implements hook_uninstall().