signup_certificate.module in Certificate 8.3
Same filename and directory in other branches
- 6.2 modules/signup_certificate/signup_certificate.module
- 6 modules/signup_certificate/signup_certificate.module
- 7.3 modules/signup_certificate/signup_certificate.module
- 7.2 modules/signup_certificate/signup_certificate.module
- 4.x modules/signup_certificate/signup_certificate.module
- 3.x modules/signup_certificate/signup_certificate.module
File
modules/signup_certificate/signup_certificate.moduleView source
<?php
/**
* Implements hook_access_certificate().
*/
function signup_certificate_access_certificate($node, $user) {
if (in_array($node->type, signup_content_types())) {
$sql = "SELECT 1 FROM {signup_log} WHERE nid = :nid AND uid = :uid AND attended = 1";
$attended = db_query($sql, array(
':nid' => $node->nid,
':uid' => $user->uid,
))
->fetchField();
return (bool) $attended;
}
}
Functions
Name | Description |
---|---|
signup_certificate_access_certificate | Implements hook_access_certificate(). |