Change WordPress user roles and capabilities Forums Bug Reports ure_manage_options tied to Administrator visibility Reply To: ure_manage_options tied to Administrator visibility

#5001
Vladimir
Keymaster

Variable $user is not defined inside function ure_show_additional_capabilities_section().
This version will fix the issue:


                function ure_show_additional_capabilities_section($show) {
                    $user = wp_get_current_user();
                    if (in_array('admin', $user->roles) || in_array('administrator', $user->roles)) {
                        $show = false;
                    }

                    return $show;
                }