Hi community!
I am doing my own plugin and need to list all the users who can access to an specific object. How can do it?
I am blocked...
Thanks all.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- ihayredinov@ihayredinov
ihayredinov - 0 likes
- Jose Alemany Bordera@jalemany1
Jose Alemany Bordera - 0 likes
- Steve Clay@steve_clay
Steve Clay - 0 likes
- Steve Clay@steve_clay
Steve Clay - 0 likes
- Jose Alemany Bordera@jalemany1
Jose Alemany Bordera - 0 likes
You must log in to post replies.What's the problem? Just get members of access collection.
Maybe I don't understand the functions of the API.
I need a function that receive as parameter an specific object (e.g. an Blog with FRIENDS access level, and whose author is different to the logged user) and return the users who can access to it.
get_members_of_access_collection -> receive a collection_id
Could serve, but for a very general level access (FRIENDS)...would it work? And if I need it for an object created by a different user to the logged user?
I hope you understand what I mean. Thanks!
If the access_id is an access collection, use get_members_of_access_collection.
If it's ACCESS_FRIENDS, use elgg_get_entities_from_relationship to get the friends.
Also note admins can see everything.
(You have to branch logic based on the value, there's no Elgg function that does this for you.)
I do it ^^
Thank you for all your help.