Restrict Group Creation Download 1.1

This component/theme works with latest OSSN version.
German ~Z~ Man 2 weeks ago

Restrict Group Creation

Restrict creating of new groups to admins only

German ~Z~ Man Replied 2 weeks ago

Okay, backdoor closed now.
Arsalan's code has been added with Version 1.1


German Arsalan Shah Replied 2 weeks ago

hahah make sense now ;)

German ~Z~ Man Replied 2 weeks ago

Yes, we may add that code to be 100% safe.

On the other hand: If I had my community restricted that way, and one hacking member actually created a group through this backdoor - I swear: neither this group would last very long nor his membership. 👿

German Arsalan Shah Replied 2 weeks ago

Very nice, maybe we should also add a option (if some user manually visit group/add url).

//to avoid manually visiting URL and adding group.
function ossn_restirct_group_creation_init(){
    ossn_register_callback('action', 'load', 'ossn_restirct_group_creation');
function ossn_restirct_group_creation($callback, $type, $params){
                if(!ossn_loggedin_user()->isAdmin() && $params['action'] == 'group/add'){
                        ossn_trigger_message('You can not create group', 'error');
ossn_register_callback('ossn', 'init', 'ossn_restirct_group_creation_init')


Developer: ~Z~
License ossnv3
Type: Site admin
Ossn Version: 5.x
Latest Version: 1.1
Last Updated 2 weeks ago
Repository Url View Repository