ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 }
global $DIC
Definition: saml.php:7
__construct(ilUserCertificateRepository $userCertificateRepository=null)
ilCertificateHasUserCertificateValidator constructor.