You are here

function Messaging_Send_Method::message_user in Messaging 6.4

Same name and namespace in other branches
  1. 7 messaging.method.inc \Messaging_Send_Method::message_user()

Prepare message for specific user. Check availability, redirect, etc..

Redirecting is only possible when we are sending to a user account, not for anonymous destinations

File

includes/messaging_method.class.inc, line 306
Drupal Messaging Framework - Send_Method class file

Class

Messaging_Send_Method
Sending method, implements all specific method functionality

Code

function message_user($message, $account = NULL) {
  if ($callback = $this
    ->get_info('user callback')) {
    $account = $account ? $account : $message
      ->get_user();
    call_user_func($callback, $message, $account);
  }
}