3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00
farmOS/modules/farm/farm_access/farm_access.install

35 lines
566 B
Text

<?php
/**
* @file
* Farm Access install file.
*/
/**
* Implements hook_install().
*/
function farm_access_install() {
// Create farm roles.
farm_access_roles_create();
}
/**
* Synchronize all available farm role permissions.
*/
function farm_access_enable() {
// Sync permissions.
farm_access_sync_perms();
}
/**
* Implements hook_uninstall().
*/
function farm_access_uninstall() {
// Delete the farm roles provided by this module.
$roles = farm_access_farm_access_roles();
foreach ($roles as $name) {
user_role_delete($name);
}
}