Support » Plugin: PressPermit » Update to 2.7.8 (possibly earlier) breaks pp_get_groups_for_users()

  • Resolved Patrick



    When I updated Press Permit Core to 2.7.8 recently, it began throwing the “This site is experiencing technical difficulties” message for non-admin users. debug.log told me that there was a Uncaught Error: Call to undefined function pp_get_groups_for_user().

    I searched the plugin code, and discovered this:

    if (!function_exists('pp_get_group_for_user')) {
        function pp_get_group_for_user($user_id, $agent_type = 'pp_group', $args = [])
            return \PublishPress\Permissions\API::getGroupsForUser($user_id, $agent_type, $args);

    I believe there’s a typo: pp_get_group_for_user should be pp_get_groups_for_user (note the s on groups).

    I was able to fix my installation using an mu-plugin that provides pp_get_groups_for_user(), but others might have trouble as well.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.