function commerce_order_account_pane_review in Commerce Core 7
Account pane: returns the username and e-mail for the Review checkout pane.
File
- modules/
order/ includes/ commerce_order.checkout_pane.inc, line 134 - Checkout pane callback functions for the Order module.
Code
function commerce_order_account_pane_review($form, $form_state, $checkout_pane, $order) {
$content = array();
// Display the username if it's different from the e-mail address.
if ($order->uid > 0) {
$account = user_load($order->uid);
if ($account->name != $order->mail) {
// Note we're not using theme_username() to avoid linking out of checkout.
$content[] = array(
'#type' => 'item',
'#title' => t('Username'),
'#markup' => check_plain($account->name),
);
}
}
$content[] = array(
'#type' => 'item',
'#title' => t('E-mail address'),
'#markup' => check_plain($order->mail),
);
return drupal_render($content);
}