root/devel/mod/search/lib/groups_delete.php

Revision 1539, 0.5 kB (checked in by renato, 1 year ago)

Setting prop svn:eol-style in LOTS of files.

  • Property svn:mime-type set to text/plain
  • Property svn:eol-style set to native
Line 
1 <?php
2 global $USER;
3 // groups:delete
4 // When an access group is deleted, revert all tags restricted to that group to private
5
6 if (isset($parameter) && logged_on) {
7    
8     // Grab group ID
9     $group_id = (int) $parameter;
10     // Create 'private' access string for current user
11     $access = "user" . $USER->ident;
12    
13     // Update tags table, setting access to $access
14     // where the owner is the current user and access = 'group$group_id'
15     set_field('tags','access',$access,'access','group'.$group_id,'owner',$USER->ident);
16    
17 }
18
19 ?>
Note: See TracBrowser for help on using the browser.