You are here

function messaging_simple_user_page in Messaging 5

Same name and namespace in other branches
  1. 6.4 messaging_simple/messaging_simple.module \messaging_simple_user_page()
  2. 6 messaging_simple/messaging_simple.module \messaging_simple_user_page()
  3. 6.2 messaging_simple/messaging_simple.module \messaging_simple_user_page()
  4. 6.3 messaging_simple/messaging_simple.module \messaging_simple_user_page()
  5. 7 messaging_simple/messaging_simple.module \messaging_simple_user_page()

Menu callback. Display pending messages to the user

Sample Implementation of messaging pull methods

1 string reference to 'messaging_simple_user_page'
messaging_simple_menu in messaging_simple/messaging_simple.module
Implementation of hook_menu().

File

messaging_simple/messaging_simple.module, line 42
Simple messaging using html page. Messaging method plug-in

Code

function messaging_simple_user_page($account, $op = NULL, $id = NULL) {
  drupal_set_title(t('Messages for %name', array(
    '%name' => $account->name,
  )));

  // Fetch all pending messages.
  switch ($op) {
    case 'view':
      return drupal_get_form('messaging_simple_user_message', $account, $id);
      break;
    default:
      return messaging_simple_user_overview($account);
  }
}