You are here

function party_user_username_label in Party 8.2

Generate the label for a party.

1 string reference to 'party_user_username_label'
username.inc in modules/party_user/plugins/party_name_label/username.inc
Sample plugin to output just the party id as a label. This is just a proof of concept / example.

File

modules/party_user/plugins/party_name_label/username.inc, line 31
Sample plugin to output just the party id as a label. This is just a proof of concept / example.

Code

function party_user_username_label($party) {
  $data_set_controller = party_get_crm_controller($party, 'user');
  $user = $data_set_controller
    ->getEntity();
  if (empty($user->name)) {
    return;
  }
  return $user->name;
}