function biblio_get_user_pubs in Bibliography Module 6.2
Same name and namespace in other branches
- 6 biblio.pages.inc \biblio_get_user_pubs()
Retrieves the publications associated with an user ID.
Parameters
object $user: An object with user information possibly including contributor ID or the last name of the user. At minimum the user ID must be specified.
$profile: (optional)
string $nofilter: (optional)
Return value
array An array of publications associated with a user.
1 string reference to 'biblio_get_user_pubs'
- biblio_menu in ./
biblio.module - Implements hook_menu().
File
- includes/
biblio.pages.inc, line 1182 - Functions in the biblio module related to filtering and page generation.
Code
function biblio_get_user_pubs($user, $profile = '', $nofilters = '') {
if (isset($user->biblio_contributor_id) && !empty($user->biblio_contributor_id)) {
$pubs = biblio_db_search('author', $user->biblio_contributor_id, $profile, $nofilters);
}
elseif (isset($user->biblio_lastname) && !empty($user->biblio_lastname)) {
$pubs = biblio_db_search('author', $user->biblio_lastname, $profile, $nofilters);
}
else {
$pubs = biblio_db_search('uid', $user->uid, $profile, $nofilters);
}
return $pubs;
}