]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
a simple function which can be used to restrict group access options
authordave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 21 Apr 2010 11:33:29 +0000 (11:33 +0000)
committerdave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 21 Apr 2010 11:33:29 +0000 (11:33 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@5831 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/groups/start.php

index bca4d15004350577c7430c3fdc597f6338c83db9..9dfe74bf7a745660bc975377a54a9e03afdecbd8 100644 (file)
 
                return $invitations;
        }
+       
+       /**
+        * Function to use on groups for access. It will house private, loggedin, public,
+        * and the group itself. This is when you don't want other groups or channels in the access options available
+        * Returns an array
+        **/
+        
+       function group_access_options($group){
+               $access_array = array(0 => 'private',1 => 'logged in users',2 => 'public',$group->group_acl => 'Group: ' . $group->name );
+               return $access_array;
+       }
 
        register_extender_url_handler('group_topicpost_url','annotation', 'group_topic_post');