WordPress.org

Support

Support » Plugins and Hacks » Members » [Resolved] Why does Members show Subscriber having 2 capabilities?

[Resolved] Why does Members show Subscriber having 2 capabilities?

Viewing 1 replies (of 1 total)
  • I had the same question.
    This has been previously answered in
    http://wordpress.org/support/topic/extra-or-hidden-capabilities-not-showing-in-members-plugin?replies=2

    For Subscriber the answer is that on the Roles page the code counts the number of elements in $role_object->capabilities.

    Object
    (
        [name] => subscriber
        [capabilities] => Array
            (
                [read] => 1
                [level_0] => 1
            )
    
    )

    BUT when the capabilities are displayed on Edit Role the list is matched against the result from members_get_capabilities()
    which, by default, strips out the “level_n” roles.

    Perhaps the code to remove old levels should be run against $role_object-> capabilities before performing the count.

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Why does Members show Subscriber having 2 capabilities?’ is closed to new replies.
Skip to toolbar