You are here

function certificate_test_access_certificate in Certificate 6.2

Same name and namespace in other branches
  1. 8.3 modules/certificate_test/certificate_test.module \certificate_test_access_certificate()
  2. 7.3 modules/certificate_test/certificate_test.module \certificate_test_access_certificate()
  3. 7.2 modules/certificate_test/certificate_test.module \certificate_test_access_certificate()
  4. 3.x modules/certificate_test/certificate_test.module \certificate_test_access_certificate()

Implements hook_access_certificate().

Has user finished this activity?

File

modules/certificate_test/certificate_test.module, line 36

Code

function certificate_test_access_certificate($node, $user) {
  if ($node->type == 'certificate_activity') {
    if (isset($GLOBALS['certificate_ok']) || isset($_GET['certificate_ok'])) {
      return TRUE;
    }
    else {
      return 'Custom access denied message.';
    }
  }
}