Hi,
I would like to test who is the owner of a group to show or not a specific link.
is corrsct this : If ( $page_owner== 'group_admin' ) ...... ?
Thanks
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.
$page_owner = elgg_get_page_owner_entity();
if ($page_owner->getOwnerGUID() === elgg_get_logged_in_user_guid()){
// do something
}
this checks if the current logged in user is the page_owner, if you want to make sure the page_owner is a group also check ($page_owner instanceof ElggGroup)
Thank you very much Jerome,
Is working fine!
Sorry I don't undersand the second part :
Ahh thanks iionly