You are here

function Notifications_Subscription_Table::field_destination in Notifications 7

Print username or destination for anonymous users

@todo Check the part for

File

./notifications.list.inc, line 561
Drupal Notifications Framework - Default class file

Class

Notifications_Subscription_Table
Loadable collection of subscriptions for tablesel ect

Code

function field_destination($subs) {
  if ($user = $subs
    ->get_user()) {
    $username = theme('username', array(
      'account' => $user,
    ));
  }
  else {

    // Anonymous subscription, print destination instead
    $dest = $sub
      ->get_destination();
    $username = $dest
      ->address_name() . ' ' . l($dest
      ->format_address(FALSE), 'notifications/destination/' . $sub->mdid . '/manage');
  }
}