party_user.data.inc in Party 8.2
Same filename and directory in other branches
Provides the class for managing user data sets.
File
modules/party_user/includes/party_user.data.incView source
<?php
/**
* @file
* Provides the class for managing user data sets.
*/
/**
* Controller class for CRM integration.
*/
class PartyUserDataSet extends PartyDefaultDataSet {
/**
* Get the user label.
*/
public function getLabel($delta) {
$entity = $this
->getEntity($delta);
return format_username($entity);
}
/**
* Act on party delete.
*/
public function hook_party_delete() {
foreach ($this
->getEntities() as $user) {
$this
->detachEntity($user);
$method = variable_get('party_user_party_delete_action', 'disallow');
if ($method != 'disallow') {
user_cancel(array(), $user->uid, $method);
}
}
$this
->save();
}
}
Classes
Name | Description |
---|---|
PartyUserDataSet | Controller class for CRM integration. |