only the admin to create group?

I want only the admin to create groups, how do I acheive this?

  • Hi, I also looking for the same solution, but everything that discussed above were not working for me. I am using version 1.7.10.

    As I seen on this community, their is not 'create a new group' section so this is practically achievable.  Anybody know how the development team did this? Perhaps, the admin for this community can disclose the solution?

  • Quick solution : in the mod/groups/new.php change gatekeeper(); to admin_gatekeeper ();

    For a better solution, use the above code and try to troubleshoot it, if its not working.

  • Hi,

    Thanks Webgalll

    I am now able to prevent the non-admin user  to create a group by using the solution above. The problem now is that I can't hide the 'create a new group' option on the menu for the regular user.  

    I had tried the solution that gnyma given, but it seem doesn't work for me.

  • Ok, I figure it out how to hide 'create a new group' on the page.

    gnyma's solution is for the 'pg/groups/all/' page which is located at mod/groups/start.php.

    But there are other page that shows the 'create a new group' in  'pg/groups/all/' page. So to hide the option in this page, goto mod/groups/views/default/groups/side_menu.php

    change the code like below:

    <div class="sidebarBox">
    <div id="owner_block_submenu"><ul>
            echo "<li><a href=\"{$vars['url']}pg/groups/member/{$_SESSION['user']->username}\">". elgg_echo('groups:yours') ."</a></li>";
            echo "<li><a href=\"{$vars['url']}pg/groups/invitations/{$_SESSION['user']->username}\">". elgg_echo('groups:invitations') ."</a></li>";
            echo "<li><a href=\"{$vars['url']}pg/groups/new/\">". elgg_echo('groups:new') ."</a></li>";


    That's all.