Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




General Integration question

UserPost

5:01 pm
November 14, 2008


englishbased

Member

posts 2

1

I'm looking for a function that does approximately the following:

check_for_access(role,user,object)

Something like this probably exists in RoleScoper.

4:19 pm
November 17, 2008


Kevin

Admin

posts 2402

2

global $scoper;

$reqd_caps = array( 'edit_published_posts', 'edit_others_posts' );
$cols = COL_ID_RS;  // will return 1D array of user IDs.  For 2D array of all user cols, pass COLS_ALL_RS
$data_source_name = 'post';  // use this for posts or pages
$object_id = 0;  // set to nonzero to return users for a specific post

$users = $scoper->users_who_can($reqd_caps, $cols, $data_source_name, $object_id );


About the Agapetry forum

Currently Online:

14 Guests

Maximum Online: 150

Forums:

Groups: 2

Forums: 7

Topics: 1186

Posts: 5409

Members:

There are 1176 members

There are 1 guests


Kevin has made 2402 posts

Top Posters:

metal450 - 159

Ragnar - 105

YikYak - 70

whiteorb - 44

Daisy - 35

Administrator: Kevin | Moderators: Kevin