require_login.install in Require Login 7
Same filename and directory in other branches
File
require_login.installView source
<?php
/**
* @file
* require_login.install
*/
/**
* Implements hook_install().
*/
function require_login_install() {
variable_set('require_login_excluded_paths', '');
variable_set('require_login_deny_message', REQUIRE_LOGIN_DEFAULT_MESSAGE);
db_update('system')
->fields(array(
'weight' => -1000,
))
->condition('name', 'require_login', '=')
->execute();
}
/**
* Implements hook_uninstall().
*/
function require_login_uninstall() {
variable_del('require_login_excluded_paths');
variable_del('require_login_deny_message');
}
/**
* Update access denied message and system weight.
*/
function require_login_update_7100() {
variable_set('require_login_deny_message', REQUIRE_LOGIN_DEFAULT_MESSAGE);
db_update('system')
->fields(array(
'weight' => -1000,
))
->condition('name', 'require_login', '=')
->execute();
}
Functions
Name | Description |
---|---|
require_login_install | Implements hook_install(). |
require_login_uninstall | Implements hook_uninstall(). |
require_login_update_7100 | Update access denied message and system weight. |