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

Revision 1301, 0.7 kB (checked in by dramirez, 1 year ago)

Moved from units to mod:

  • profile
  • users
  • template

Updated .htaccess rules

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