Bug: disabling HRM module disables all user roles
-
Disabling the HRM module throws a warning:
PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘erp_hr_filter_editable_roles’ not found
It also disables role editing for users. No roles appear in the user profile dropdown select. I traced the error to a filter hook that calls an HRM module function which does not exists when the HRM module is deactivated. The file
/includes/actions-filters.php
has the following filter hook on line 16,add_filter( 'editable_roles', 'erp_hr_filter_editable_roles' );
replacing this with,
if(function_exists('erp_hr_filter_editable_roles')) add_filter( 'editable_roles', 'erp_hr_filter_editable_roles' );
fixes the problem.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Bug: disabling HRM module disables all user roles’ is closed to new replies.