function biblio_contributor_user_access in Bibliography Module 6.2
Same name and namespace in other branches
- 6 biblio.contributors.inc \biblio_contributor_user_access()
This function does what...
Parameters
object $user: A user object with uid property.
object $node: A node object.
Return value
true|null TRUE if the user ID matches the author Drupal user ID; otherwsie NULL.
File
- includes/
biblio.contributors.inc, line 800 - Functions related to contributors in Drupal biblio module.
Code
function biblio_contributor_user_access($user, $node) {
if (isset($node->biblio_contributors) && is_array($node->biblio_contributors)) {
foreach ($node->biblio_contributors as $cat => $authors) {
foreach ($authors as $key => $author) {
if ($author['drupal_uid'] == $user->uid) {
return TRUE;
}
}
}
}
return;
}