MidCOM level replacement for the Midgard Person record with framework support.

package midcom.db

 Methods

__construct (mixed $id)

The default constructor will create an empty object.

Optionally, you can pass an object ID or GUID to the object which will then initialize the object with the corresponding DB instance.

Parameters

$id

mixedA valid object ID or GUID, omit for an empty object.

__set ($property, $value)

Parameters

$property

$value

_on_created ()

Updates all computed members and adds a midgard:owner privilege for the person itself on the record.

_on_deleted ()

Deletes all group and event memberships of the original person record.

SUDO privileges are used at this point, since only memberships are associated to the groups, not persons and event memberships belong to the event, again not to the person.

_on_loaded ()

Updates all computed members.

add_to_group (string $name)

Adds a user to a given Midgard Group.

Caller must ensure access permissions are right.

todo Check if user is already assigned to the group.

Parameters

$name

stringThe name of the group we should be added to.

Returns

booleanIndicating success.

get_label ()

_update_computed_members ()

Synchronizes the $name, $rname, $emaillink and $homepagelink members with the members they are based on.

 Properties

 

mixed $__mgdschema_class_name__

 

mixed $__midcom_class_name__

     

string $name

Read-Only variable, consisting of "$firstname $lastname".

Updated during all DB operations.

 

string $rname

Read-Only variable, consisting of "$lastname, $firstname".

Updated during all DB operations.