You are here

function mailing_list_email_get_name in Mailing List 7

Same name and namespace in other branches
  1. 6 mailing_list.module \mailing_list_email_get_name()

Gets the name for a subscriber e-mail if available, otherwise gets the e-mail address.

Parameters

$data: Subscriber object.

Return value

Subscriber name or subscriber e-mail.

File

./mailing_list.module, line 381
Minimalistic mailing list module.

Code

function mailing_list_email_get_name($data) {
  $data = (object) $data;
  return !empty($data->name) ? $data->name : $data->mail;
}