Overview  Package  Tree cmsdAm 0.8

cmsdAm

Class cmsdam_groups

cmsdAm.cmsdam_groups

class cmsdam_groups

cmsdAm group handling class.

This is the group class, if you need to do users group operations you'll find here all you need, ... :-)

Class instance: $cms->groups

Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>

Field Summary
public var$dbms

You should not use this variable from your section.

public var$users

You should not use this variable from your section.

public var$ldap

You should not use this variable from your section.

public var$logs

You should not use this variable from your section.

public var$debug

You should not use this variable from your section.

Method Summary
public arraygroup_users_id

Returns an array with all the userIDs in "$group" group.

public arraygroup_users_name

Returns an array with all the userNAMESs in "$group" group.

public arraygroup_names

Returns an array with all the group NAMES.

public boolgroup_add_user

Add the "$username" user to the "$groupname" group, or creates the "$groupname" group with "$username" user if it does not exists.

public boolgroup_del_user

Delete the "$username" user from the "$groupname" group, if this is the last user, the group will be deleted.

public strgroup_date

Returns the string with the user "$username" subscription date for the "$groupname" group.

public intgroup_type

Returns the user "$username" subscription type for the "$groupname" group.

public strgroup_ip

Returns the user "$username" subscription IP address for the "$groupname" group.

Field Detail

dbms

public var $dbms

You should not use this variable from your section.


users

public var $users

You should not use this variable from your section.


ldap

public var $ldap

You should not use this variable from your section.


logs

public var $logs

You should not use this variable from your section.


debug

public var $debug

You should not use this variable from your section.

Method Detail

group_users_id()

public array group_users_id(str group)

Returns an array with all the userIDs in "$group" group.

You can use this method to get all the ID for the users of the group "$group".
Return false on errors, null on empty groups, array on success.

NOTE: This method doesn't work with LDAP due to ldap structure.

Parameters:
group - The group name you want the users IDs of
Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
Returns:
Array with all userIDs

group_users_name()

public array group_users_name(str group)

Returns an array with all the userNAMESs in "$group" group.

You can use this method to get all the NAMES for the users of the group "$group".
Return false on errors, null on empty groups, array on success.

NOTE: This method works correctly with LDAP.

Parameters:
group - The group name you want the users NAMES of
Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
Returns:
Array with all userNAMES

group_names()

public array group_names()

Returns an array with all the group NAMES.

You can use this method to get all the group NAMES.
Return false on errors, array on success.

NOTE: This method works correctly with LDAP.

Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
Returns:
Array with all group NAMES

group_add_user()

public bool group_add_user(str groupname,
                           str grouptype = "",
                           str username,
                           str groupip = "")

Add the "$username" user to the "$groupname" group, or creates the "$groupname" group with "$username" user if it does not exists.

Return false on errors, true on success.

Parameters:
groupname - The name of the group. If it does not exists, it will be created
grouptype - Reserved for future uses. For now use 1
username - The user to add to the group
groupip - The IP address of the people that's using this method
Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
Returns:
False on error, True on success

group_del_user()

public bool group_del_user(str groupname,
                           str username)

Delete the "$username" user from the "$groupname" group, if this is the last user, the group will be deleted.

Return false on errors, true on success.

NOTE: This method doesn't work with LDAP for now.

Parameters:
groupname - The name of the group
username - The user to delete from the group. If it's the last user delete the group.
Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
Returns:
False on error, True on success

group_date()

public str group_date(str groupname,
                      str username)

Returns the string with the user "$username" subscription date for the "$groupname" group.

You can use this method to get the subscription date for the user "$username" in the group "$groupname".

NOTE: This method doesn't work with LDAP for now.

Parameters:
groupname - The group name you want the subscription date
username - The user name you want the subscription date
Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
Returns:
Subscription date string for user "$username" into group "$groupname"

group_type()

public int group_type(str groupname,
                      str username)

Returns the user "$username" subscription type for the "$groupname" group.

You can use this method to get the subscription type for the user "$username" in the group "$groupname".

NOTE: This method doesn't work with LDAP due to the LDAP structure.
NOTE: This method is experimental and is reserved for future uses.

Parameters:
groupname - The group name you want the subscription type
username - The user name you want the subscription type
Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
Returns:
Subscription type for user "$username" into group "$groupname"

group_ip()

public str group_ip(str groupname,
                    str username)

Returns the user "$username" subscription IP address for the "$groupname" group.

You can use this method to get the subscription IP address for the user "$username" in the group "$groupname".

NOTE: This method doesn't work with LDAP due to the LDAP structure.

Parameters:
groupname - The group name you want the subscription type
username - The user name you want the subscription type
Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
Returns:
Subscription IP address for user "$username" into group "$groupname"

Overview  Package  Tree cmsdAm 0.8