function user_patterns in Patterns 7.2
Same name and namespace in other branches
- 5 components/user.inc \user_patterns()
- 6.2 components/user.inc \user_patterns()
- 6 components/user.inc \user_patterns()
- 7 patterns_components/components/user.inc \user_patterns()
Implements hook_patterns() for the user module.
File
- patterns_components/
components/ user.inc, line 13
Code
function user_patterns($data) {
$files = array(
'modules/user/user.admin.inc',
'modules/user/user.pages.inc',
);
$actions['role'] = array(
PATTERNS_INFO => t('Create/Modify/Delete Roles'),
PATTERNS_CREATE => array(
'user_admin_roles',
),
PATTERNS_MODIFY => array(
'user_admin_role',
),
PATTERNS_DELETE => array(
'user_admin_role_delete_confirm',
),
PATTERNS_FILES => $files,
PATTERNS_EXPORT => array(
PATTERNS_EXPORT_ALL => 'user_patterns_export_all_roles',
),
);
$actions['permission'] = array(
PATTERNS_INFO => t('Create/Modify/Delete Permissions'),
PATTERNS_MODIFY => array(
'set_user_permissions',
),
// Run through custom function. It was previously run through user_admin_permissions.
PATTERNS_FILES => $files,
PATTERNS_EXPORT => array(
PATTERNS_EXPORT_ALL => 'user_patterns_export_all_permissions',
),
);
$actions['user'] = array(
PATTERNS_INFO => t('Create/Modify/Delete Users'),
PATTERNS_CREATE => array(
'user_register_form',
),
PATTERNS_MODIFY => array(
'set_user_values',
),
// Run through custom function. It was previously run through user_profile_form
PATTERNS_DELETE => array(
'user_cancel_confirm_form',
),
PATTERNS_FILES => $files,
PATTERNS_EXPORT => array(
PATTERNS_EXPORT_ALL => 'user_patterns_export_all_users',
),
);
$actions['role_users'] = array(
PATTERNS_INFO => t('Add/Remove roles to users'),
PATTERNS_CREATE => array(
'set_role_users',
),
// Run through custom function.
PATTERNS_DELETE => array(
'unset_role_users',
),
// Run through custom function.
PATTERNS_FILES => $files,
PATTERNS_EXPORT => array(
PATTERNS_EXPORT_ALL => 'user_patterns_export_all_role_users',
),
);
return $actions;
}