You are here

function views_handler_field_signup_email in Signup 5.2

1 string reference to 'views_handler_field_signup_email'
_signup_views_tables in views/views.inc
Private implementation of hook_views_tables().

File

views/views.inc, line 206
Provides support for Views integration.

Code

function views_handler_field_signup_email($fieldinfo, $fielddata, $value, $data) {
  if ($value == 0) {

    // Anonymous, the email is included in the $data object already.
    $table = $fieldinfo['table'];
    $field = $table . '_anon_mail';
    return check_plain($data->{$field});
  }
  else {

    // Authenticated, have to get the email from the $user object via uid.
    $account = user_load(array(
      'uid' => $value,
    ));
    return check_plain($account->mail);
  }
}