You are here

function mailing_list_email_get_name in Mailing List 6

Same name and namespace in other branches
  1. 7 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.

2 calls to mailing_list_email_get_name()
mailing_list_email_delete_confirm in ./mailing_list.admin.inc
E-mail deletion form.
mailing_list_email_form_submit in ./mailing_list.admin.inc
Submit handler for the add / edit e-mail form.

File

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

Code

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