Discussion:
Allow authors to create new users but only as Contributors
Dino Termini
2013-11-06 17:37:44 UTC
Permalink
Hi,

for a project that I'm working on, I need to give Authors the capability
to create new users. Using the Members plugin, this was just a matter of
a few clicks.

The tricky part is now to restrict this functionality so that Authors
can only create Contributors or Subscribers, but not Authors and above.

Also, if a given Author has capability my_custom_enable_something, the
new user s/he creates should inherit that capability as well.

Can someone point me into the right direction or explain how to
implement such a thing?

Thank you,
Dino.
J.D. Grimes
2013-11-06 19:26:18 UTC
Permalink
As per here <http://wordpress.stackexchange.com/a/53685/27757> you can hook into the 'editable_roles' filter, and limit the roles returned based on the roles/caps of the current user.

-J.D.
Hi,
for a project that I'm working on, I need to give Authors the capability to create new users. Using the Members plugin, this was just a matter of a few clicks.
The tricky part is now to restrict this functionality so that Authors can only create Contributors or Subscribers, but not Authors and above.
Also, if a given Author has capability my_custom_enable_something, the new user s/he creates should inherit that capability as well.
Can someone point me into the right direction or explain how to implement such a thing?
Thank you,
Dino.
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Loading...