You are here

function anonymous_publishing_lr_user_access in Anonymous Publishing 7

Access callback to check for access to claim tab.

1 string reference to 'anonymous_publishing_lr_user_access'
anonymous_publishing_lr_menu in modules/lr/anonymous_publishing_lr.module
Implements hook_menu().

File

modules/lr/anonymous_publishing_lr.module, line 27
Hooks for the Anonymous Publishing LR module.

Code

function anonymous_publishing_lr_user_access($account = NULL) {
  global $user;
  $nodes = FALSE;
  if ($user->uid == $account->uid) {
    $mail = $account->mail;
    $sql = "SELECT nid, email FROM  {anonymous_publishing} WHERE email = :mail";
    $nodes = db_query($sql, array(
      ':mail' => $mail,
    ))
      ->rowCount();
  }
  return $nodes;
}