function messaging_simple_user_overview in Messaging 5
Same name and namespace in other branches
- 6.4 messaging_simple/messaging_simple.module \messaging_simple_user_overview()
- 6 messaging_simple/messaging_simple.module \messaging_simple_user_overview()
- 6.2 messaging_simple/messaging_simple.module \messaging_simple_user_overview()
- 6.3 messaging_simple/messaging_simple.module \messaging_simple_user_overview()
- 7 messaging_simple/messaging_simple.module \messaging_simple_user_overview()
Display message overview list
1 call to messaging_simple_user_overview()
- messaging_simple_user_page in messaging_simple/
messaging_simple.module - Menu callback. Display pending messages to the user
File
- messaging_simple/
messaging_simple.module, line 58 - Simple messaging using html page. Messaging method plug-in
Code
function messaging_simple_user_overview($account) {
$output = '';
$messages = messaging_store('get', array(
'method' => 'simple',
'uid' => $account->uid,
), array(
'mqid DESC',
), MESSAGING_SIMPLE_PAGER, 0, TRUE);
if ($messages) {
$header = array(
t('Subject'),
t('From'),
t('Date'),
);
$rows = array();
foreach ($messages as $message) {
$rows[] = array(
l($message['subject'], 'user/' . $account->uid . '/messages/view/' . $message['mqid']),
!empty($message['sender_account']) ? theme('username', $message['sender_account']) : t('System'),
format_date($message['created']),
);
}
$output .= theme('table', $header, $rows);
$output .= theme('pager', array(), MESSAGING_SIMPLE_PAGER);
}
else {
$output .= t('No pending messages');
}
return $output;
}