Skip to content

Commit b215843

Browse files
committed
Updated view_user_cert to view all certs including CE certs. This PR is made for #231
1 parent 374ad02 commit b215843

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

view_user_cert.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,9 @@ function display_error_page($message) {
5353
}
5454

5555
// Fetch the certificate associated with the retrieved issue.
56-
// The certificate must be one of the recognized eCard types: 'Cognitive eCard' or 'Completion eCard'.
57-
$certificate = $DB->get_record_sql("
58-
SELECT * FROM {customcert}
59-
WHERE id = ? AND name IN ('Cognitive eCard', 'Completion eCard')
60-
", [$issue->customcertid]);
61-
56+
$certificate = $DB->get_record('customcert', ['id' => $issue->customcertid]);
6257
if (!$certificate) {
63-
display_error_page('The certificate type is not valid or does not exist. Please contact the site administrator for assistance.');
58+
display_error_page('The certificate does not exist. Please contact the site administrator for assistance.');
6459
}
6560

6661
// Retrieve the corresponding template for the fetched certificate.

0 commit comments

Comments
 (0)