Please i want only owners of groups to edit their group. I don't want site admins to have access to edit groups. Please how can do this. I tried his but i didn't work. Any help pls
if(($group = get_entity($group_guid)) && ($group instanceof ElggGroup) && ($group->owner_guid)){
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.
- Matt Beckett@Beck24

Matt Beckett - 0 likes
- New_age@Ejirefeedafe

New_age - 0 likes
- New_age@Ejirefeedafe

New_age - 0 likes
- New_age@Ejirefeedafe

New_age - 0 likes
- <?php
-
- function myplugin_init() {
-
- register_plugin_hook('permissions_check', 'group', 'myplugin_group_perms', 1000);
-
- }
-
- function myplugin_group_perms($hook_name, $entity_type, $return_value, $parameters) {
-
- if (isadminloggedin() && get_loggedin_userid() != $params['entity']->owner_guid) {
-
- return false;
-
- }
-
- }
-
- // Initialise plugin
- register_elgg_event_handler('init', 'system', 'myplugin_init');
- ?>
- New_age@Ejirefeedafe

New_age - 0 likes
- New_age@Ejirefeedafe

New_age - 0 likes
You must log in to post replies.I'm not sure if it site admins can be denied access to anything, but if they can it would be by using the permissions_check plugin hook
Thanks i will try to see if it works.
Thanks once again
Thanks i will try to see if it works.
Thanks once again
Hello i changed the code to 1.7 but it didn't work maybe the code isn't right. Please help check
@ Matt it is Solved. I added the below code before $group->canEdit())){
($group->isMember($user)
like this
if(($group = get_entity($group_guid)) && ($group instanceof ElggGroup) && ($group->isMember($user) && $group->canEdit())){
Please how can i allow only non-admins to request memebership in a closed group?