• Hi,

    I’m using another plugin to retreive user meta info. However, when I use the ‘role’ meta key, it’so only pulling the main role but not the “other roles”. Should I be using another key to pull those additional roles?

Viewing 1 replies (of 1 total)
  • Plugin Author Vladimir Garagulya

    (@shinephp)

    Hi,

    WordPress stores all roles granted to user together in the single meta field, with key wp_capabilities (replace ‘wp_’ with your own db prefix).

    
    a:2:{s:11:"contributor";b:1;s:10:"subscriber";b:1;}
    

    This user has 2 roles: contributor as a primary role and subscriber, as additional role. Primary role is always the 1st element in the roles array, which serialized content WordPress stores at this meta field.

Viewing 1 replies (of 1 total)
  • The topic ‘Other Roles Meta Key’ is closed to new replies.