You are here

function Messaging_Message::get_sender_name in Messaging 7

Same name and namespace in other branches
  1. 6.4 includes/messaging_message.class.inc \Messaging_Message::get_sender_name()

Get sender name

File

./messaging.message.inc, line 255
Drupal Messaging Framework - Message class file

Class

Messaging_Message
Message class

Code

function get_sender_name() {
  if ($name = $this
    ->get_sender('name')) {
    return $name;
  }
  elseif ($account = $this
    ->get_sender_account()) {
    return $this->sender['name'] = check_plain($account->name);
  }
  else {
    return $this->sender['name'] = variable_get('site_name', 'Drupal');
  }
}