You are here

function signup_certificate_access_certificate in Certificate 6.2

Same name and namespace in other branches
  1. 8.3 modules/signup_certificate/signup_certificate.module \signup_certificate_access_certificate()
  2. 6 modules/signup_certificate/signup_certificate.module \signup_certificate_access_certificate()
  3. 7.3 modules/signup_certificate/signup_certificate.module \signup_certificate_access_certificate()
  4. 7.2 modules/signup_certificate/signup_certificate.module \signup_certificate_access_certificate()
  5. 4.x modules/signup_certificate/signup_certificate.module \signup_certificate_access_certificate()
  6. 3.x modules/signup_certificate/signup_certificate.module \signup_certificate_access_certificate()

File

modules/signup_certificate/signup_certificate.module, line 3

Code

function signup_certificate_access_certificate($node, $user) {
  if (in_array($node->type, signup_content_types())) {
    $sql = "select 1 from {signup_log} where nid = %d and uid = %d and attended = 1";
    $attended = db_result(db_query($sql, $node->nid, $user->uid));
    return (bool) $attended;
  }
}