admin管理员组文章数量:1323508
I got on the list to test a private beta of a plugin I'm using on a multisite network.
The plugin authors have code in there to add a custom role. They have a bug that removes the ability to give a user any role except their one custom role.
When I visit ../wp-admin/network/site-users.php
, the "Add User" role pulldowns only show the one role this plugin added. The change role pulldown menu shows all the WP default roles, plus a few extra roles this and other plugins have added. If I attempt to change a user to one of these roles, I get a "You can't give users that role" error page.
I've been discussing this with the developer, and they seem baffled.
I've been looking through my database and the codex, and I can't find where the valid roles are defined.
I got on the list to test a private beta of a plugin I'm using on a multisite network.
The plugin authors have code in there to add a custom role. They have a bug that removes the ability to give a user any role except their one custom role.
When I visit ../wp-admin/network/site-users.php
, the "Add User" role pulldowns only show the one role this plugin added. The change role pulldown menu shows all the WP default roles, plus a few extra roles this and other plugins have added. If I attempt to change a user to one of these roles, I get a "You can't give users that role" error page.
I've been discussing this with the developer, and they seem baffled.
I've been looking through my database and the codex, and I can't find where the valid roles are defined.
Share Improve this question asked Jan 12, 2013 at 2:01 cpilkocpilko 7352 gold badges6 silver badges15 bronze badges2 Answers
Reset to default 47User roles are stored in wp_options
table.
search for option name wp_user_roles
in the wp_options
table.
User Roles are stored in table wp_user_meta
To check user roles, first, check out the user id in the table wp_users
(Column name ID)
Now Go to table wp_usermeta
and search where column user_id
is equal to the ID that matches ID
from wp_users
table.
You will get a list of rows with metadata of the chosen user, the row with meta_key
as wp_capabilities
defines the user role.
The Value of wp_capabilities
for
- Admin :
a:1:{s:13:"administrator";b:1;}
- Woo Commerce Customer :
a:1:{s:8:"customer";b:1;}
本文标签: multisiteWhere are available Roles Defined in the wp database
版权声明:本文标题:multisite - Where are available Roles Defined in the wp_ database? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742138338a2422469.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论