• Hi,

    I have custom post types with specific editing capabilities.
    When I set these capabilities to the group, everything works fine, except one thing : I cannot change the author of the post neither in the quick edit form nor in the post edition page itself.

    I still have to assign a specific role to the user to see him in the dropdown.

    I think this is due to the user_level condition in the prepare_query method of the class-wp-user-query.php

    SELECT wpmv_users.ID,wpmv_users.user_login,wpmv_users.display_name
    FROM wpmv_users
    INNER JOIN wpmv_usermeta
    ON ( wpmv_users.ID = wpmv_usermeta.user_id )
    WHERE 1=1
    AND ( ( wpmv_usermeta.meta_key = 'wpmv_user_level'
    AND CAST(wpmv_usermeta.meta_value AS CHAR) != '0' ) )
    ORDER BY display_name ASC

    Maybe a way to change this thanks to this (line 510)
    do_action_ref_array( 'pre_user_query', array( &$this ) );

    or otherwise, users in a group with edition capabilities should be given a level 1+ user_level meta if it has a level 0 ?

    Thanks,

    Oliver.

    https://www.ads-software.com/plugins/groups/

  • The topic ‘Unable to change post author based on capability’ is closed to new replies.