Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




WP_Role::has_role(), add_role(), remove_role() equivalents

UserPost

5:13 am
July 4, 2009


MMM

New Member

posts 1

1

Hello,

Does, Role Scoper provide equivalents to these functions?


11:23 am
July 6, 2009


Kevin

Admin

posts 2381

2

WordPress API for the users' WP role will still work ($current_user->is_role, $current_user->add_role, $current_user->remove_role).

I have not yet developed equivalent API for RS-assigned General Roles. Will make a note to do so soon.

For now, all you have are:

  • $current_user->assigned_blog_roles : array property with role handles as array keys
  • $role_assigner->assign_blog_roles() : Probably not convenient as API, but see role_assigner_rs.php for function def and general_roles.php for usage (role addition or removal)

About the Agapetry forum

Currently Online:

17 Guests

Maximum Online: 150

Forums:

Groups: 2

Forums: 7

Topics: 1181

Posts: 5363

Members:

There are 1173 members

There are 1 guests


Kevin has made 2381 posts

Top Posters:

metal450 - 148

Ragnar - 102

YikYak - 68

whiteorb - 44

Daisy - 35

Administrator: Kevin | Moderators: Kevin