Group Access v1.1.0

Release Notes

Release notes:


  • Add the line 

trigger_plugin_hook('access', 'group', array('group' => $group));

in file elgg_root_dir/mod/groups/actions/edit.php after the line 100 with the contents


This is part of the solution for the problem of viewing permission for groups not yet approved.



  • 1.7.x


  • Logic forces admin to notify user before deleting a group.
  • Better design.
  • hello Leo; there is a best way to fix that problem about the permission for groups not yet approved; without change the code in the original groups plugin??

  • @Melvyn GómezI think that this is the best solution. Is a good pratice trigger hooks inside actions to extend them.

    The problem is in visibility of groups in file mod/views/default/forms/groups/edit.php between lines 69 and 91. If you find another elegant solution, please publish it. Thanks. 


  • ohh ok; i will try to do a best solution; btw you already test in 1.7.6?? i'm trying and getting a error in the file groups/actions/edit.php, is not processing the file; following your warning of course.

  • @Melvyn Gómez, I tested the plugin in version 1.7.6 and everything is ok. There is no error. 

    The changes in file groups/actions/edit.php is in bold in the follwing passage:



    trigger_plugin_hook('access', 'group', array('group' => $group)); // add this line

    // group creator needs to be member of new group

    if ($new_group_flag) {


    add_to_river('river/group/create', 'create', $user->guid, $group->guid);



  • hi Leo; yeap it works thank you, i did try this:

    1- with a normal user create a group, is ok

    2- with a admin user go to the tab Groups waiting activation and disable, next go to the tab Group disabled and click in Active

    3- with the admin user i can see the new group in Newest but with the owner of the group still say "This group is waiting to be accepted by a moderator. It is currently available only for you."

    4- with other user i can't see the group but with admin user in the tab Groups activated appears the group but really is only visible for the admin and owner

    This is a bug?

    If i do try the other way it works, create a group with a normal user and next with the admin go to the tab Groups waiting activation and Active, is visible for all users.

  • other question Leo; what about if i already have a lot of groups; the new groups will have the status group_created while they are waiting to be activated but too the old groups have this status group_created, so if i go to the old groups (without the metadata GROUP_STATE) the condition if (!$groupAccess->isAccepted()) always will be true, any idea in this case??

  • This is a bug, Melvyn. The problem is in function updateAccess() in class Desactivated. The metadata GROUP_VISIBILITY loses it value when admin disable the group in tab "Groups waiting activation". The solution is in version 1.1.1. Thanks for related the bug.

Leo de Carvalho

Graduate Student, Software Engineering, UFV


  • Category: Site admin
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-17
  • Downloads: 3126
  • Recommendations: 9

Other Projects

View Leo de Carvalho's plugins