Class: GroupAdminService

Source Location: /CORE/system/classes/group/GroupAdminService.php

Class GroupAdminService

Class Overview

The GroupAdminService is used for write access to Groups.

Located in /CORE/system/classes/group/GroupAdminService.php [line 36]



		
				Author(s):
		
  • Kevin Papst
Information Tags:
Version:  $Id: GroupAdminService.php,v 1.8 2008/07/14 23:27:52 kpapst Exp $
Copyright:  Copyright (C) Kevin Papst
License:  GNU Public License

Methods

[ Top ]
Method Summary
void   addToGroup()   Adds an User to a Group.
the   createGroup()   Creates a new UserGroup.
mixed   createGroupWithID()   Creates a new UserGroup with the given ID.
void   deleteAllGroups()   Deletes all UserGroups.
void   deleteGroup()   Deletes an UserGroup.
void   removeAllMemberships()   Remove User from all groups currently mapped to.
void   removeFromGroup()   Removes an User from a Group.

[ Top ]
Methods
addToGroup  [line 42]

  void addToGroup( $groupid, $userid  )

Adds an User to a Group.

Parameters:
   $groupid: 
   $userid: 


[ Top ]
createGroup  [line 110]

  the createGroup( String $name  )

Creates a new UserGroup.

Parameters:
String   $name:  name the Name of the new UserGroup

API Tags:
Return:  new ID


[ Top ]
createGroupWithID  [line 123]

  mixed createGroupWithID( $id, $name  )

Creates a new UserGroup with the given ID.

DO NOT USE THIS METHOD FOR SIMPLY CREATING A NEW GROUP!

Parameters:
   $id: 
   $name: 

API Tags:
Return:  the Database result
Access:  protected


[ Top ]
deleteAllGroups  [line 98]

  void deleteAllGroups( )

Deletes all UserGroups.

This does not delete the User-Group mapping, make sure to fix this!!!!!!!



[ Top ]
deleteGroup  [line 85]

  void deleteGroup( int $groupid  )

Deletes an UserGroup.

Make sure that no UserGroup mapping matches this Group, this will not be handled by this function.

Parameters:
int   $groupid:  groupid ID of the Group to be deleted


[ Top ]
removeAllMemberships  [line 70]

  void removeAllMemberships( int $userid  )

Remove User from all groups currently mapped to.

This is needed for example when a User is deleted.

Parameters:
int   $userid:  the user that should be removed from all groups


[ Top ]
removeFromGroup  [line 55]

  void removeFromGroup( $groupid, $userid  )

Removes an User from a Group.

Parameters:
   $groupid: 
   $userid: 


[ Top ]