WordPress.org

Forums

Members
[resolved] Why does Members show Subscriber having 2 capabilities? (2 posts)

  1. leejosepho
    Member
    Posted 2 years ago #

    Why does Members show Subscriber having 2 capabilities?

    http://wordpress.org/extend/plugins/members/

  2. bobbingwide
    Member
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Members
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.