Question

After reviewing plugins that deal with user roles and capabilities I concluded that I might be better off just hardcoding my settings into my functions.php file. This actually worked out well for me in end effect but I kept running into an issues while I was finalizing the code.

As I am sure many of you know (and I ended up finding out the hard way) any new capabilities added through code to an existing role which has been assigned to a user won't work. Rather it seems the role and associating capabilities are written into the database the first time the new role is assigned to a user. If I am incorrect with this assumption please let me know.

In any case... I have been getting frustrated with dealing with things manually and although I don't like the idea of plugins, this specific situations has be believing a GUI might actually work very well.

What I am looking for is a plugin or some non bloated code which essentially is just capable of reading the roles and their associating capabilities from the default wordpress database and outputs these values into a checkbox list.

So, basically the ability to just select a role which in turn displays every default capability from wordpress as well as any custom capability which is assigned to any user... Then just a checkbox next to every capability assigned to that role.

The admin could update the values by checking/unchecking applicable capabilities and one should have the ability to just enter a new capability by pasting the capabilities name into a text field.

My logic here is that if this existed then your NOT adding ANY additional custom code to the database or anything that requires more resources.

The key benefit here is that you finally have a simple way to deal with updating roles.

What I am not sure about is if this same logic would apply to being able to manually change the capabilities for individual users... If anyone also knows the answer to this question pleaseclet me know.

Was it helpful?

Solution

The plugin Members is your solution, clean code for read, change and create roles and capabilities; easy and fast. No custom tables and normaly WordPress standard.

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top