Support

Account

Home Forums Bug Reports User field filtering out all roles when no roles are selected

Solved

User field filtering out all roles when no roles are selected

  • Perhaps this is a change in functionality, but the text on the role filter for the user field says “All user roles” when no roles are selected, however it then filters out all roles.

    I was able to correct this behavior by updating fields/user.php line 96 to include a check for is_array().

    
    if( !empty($field['role']) && is_array($field['role'])) {
        // then filter by the selected roles...
    

    Using ACF Pro 5.1.3

  • Hi @jsilver ,
    Thanks for the feedback..

    There has been an improvement in the location rules in the latest version so you may also update to the latest version for the changes.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.