You are here

function biblio_profile_page in Bibliography Module 7

Same name and namespace in other branches
  1. 7.2 includes/biblio.pages.inc \biblio_profile_page()
1 string reference to 'biblio_profile_page'
biblio_menu in ./biblio.module
Implements hook_menu().

File

includes/biblio.pages.inc, line 46
Copyright (C) 2006-2011 Ron Jerome.

Code

function biblio_profile_page($user) {
  $arg_list = array();
  if (isset($user->data['biblio_contributor_id']) && $user->data['biblio_contributor_id'] > 0) {
    $arg_list = array(
      'f' => array(
        'author' => $user->data['biblio_contributor_id'],
        'profile' => TRUE,
      ),
    );
  }
  elseif (isset($user->data['biblio_lastname']) && !empty($user->data['biblio_lastname'])) {
    $arg_list = array(
      'f' => array(
        'author' => $user->data['biblio_lastname'],
        'profile' => TRUE,
      ),
    );
  }
  else {
    $arg_list = array(
      'f' => array(
        'uid' => $user->uid,
        'profile' => TRUE,
      ),
    );
  }
  $arg_list['page_limit'] = variable_get('biblio_rowsperpage', 25);
  list($nids, $extras, $rss_info) = biblio_build_query($arg_list);
  $render['biblio_page']['header'] = biblio_page_header($arg_list);
  $render['biblio_page']['profile'] = biblio_page_content($nids, $extras);
  return $render;
}