ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilCertificateUserCertificateAccessValidator.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
8 {
13 
19  {
20  if (null === $userCertificateRepository) {
21  global $DIC;
22  $database = $DIC->database();
23  $logger = $DIC->logger()->cert();
24 
26  }
27  $this->userCertificateRepository = $userCertificateRepository;
28  }
29 
35  public function validate(int $userId, int $objId)
36  {
37  try {
38  $this->userCertificateRepository->fetchActiveCertificate($userId, $objId);
39  } catch (ilException $exception) {
40  return false;
41  }
42 
43  return true;
44  }
45 }
$objId
Definition: xapitoken.php:41
$DIC
Definition: xapitoken.php:46
__construct(ilUserCertificateRepository $userCertificateRepository=null)
ilCertificateHasUserCertificateValidator constructor.