function Messaging_Message::set_sender in Messaging 6.3
Same name and namespace in other branches
- 6.4 includes/messaging_message.class.inc \Messaging_Message::set_sender()
Set sender account and related properties
Parameters
$account: Sender user account
$address: Opational method's address for this account
File
- classes/
messaging_message.class.inc, line 262 - Drupal Messaging Framework - Default class file
Class
- Messaging_Message
- Message class
Code
function set_sender($account, $address = NULL) {
$this->sender = $account->uid;
$this->sender_name = $account->name;
$this->sender_account = $account;
if (isset($address)) {
$this->sender_address = $address;
}
elseif (!isset($this->sender_address)) {
$this->sender_address = messaging_user_destination($account, $this->method);
}
}