I've fixed the issue with get_all_user_name_fields() being deprecated and the need to use the \core_user\fields API instead. To resolve this issue in your setup, all you need to do is replace the necessary changes. Simply add use core_user\fields; at the beginning of the file and replace the following part around line 99:
or change from this:
$userfields = get_all_user_name_fields(true, 'u');
$sql = "SELECT ci.id, u.id as userid, $userfields, co.id as courseid,
co.fullname as coursefullname, c.id as certificateid,
c.name as certificatename, c.verifyany
FROM {linkedincert} c
JOIN {linkedincert_issues} ci ON c.id = ci.linkedincertid
JOIN {course} co ON c.course = co.id
JOIN {user} u ON ci.userid = u.id
WHERE ci.code = :code";
to this:
$userfieldssql = \core_user\fields::for_name()->with_userpic()->get_sql('u', false);
$sql = "SELECT ci.id, u.id as userid, " . trim($userfieldssql->selects, ', ') . ", co.id as courseid,
co.fullname as coursefullname, c.id as certificateid,
c.name as certificatename, c.verifyany
FROM {linkedincert} c
JOIN {linkedincert_issues} ci ON c.id = ci.linkedincertid
JOIN {course} co ON c.course = co.id
JOIN {user} u ON ci.userid = u.id
WHERE ci.code = :code";
I've fixed the issue with get_all_user_name_fields() being deprecated and the need to use the \core_user\fields API instead. To resolve this issue in your setup, all you need to do is replace the necessary changes. Simply add use core_user\fields; at the beginning of the file and replace the following part around line 99: or change from this: $userfields = get_all_user_name_fields(true, 'u'); $sql = "SELECT ci.id, u.id as userid, $userfields, co.id as courseid, co.fullname as coursefullname, c.id as certificateid, c.name as certificatename, c.verifyany FROM {linkedincert} c JOIN {linkedincert_issues} ci ON c.id = ci.linkedincertid JOIN {course} co ON c.course = co.id JOIN {user} u ON ci.userid = u.id WHERE ci.code = :code";
to this:
$userfieldssql = \core_user\fields::for_name()->with_userpic()->get_sql('u', false); $sql = "SELECT ci.id, u.id as userid, " . trim($userfieldssql->selects, ', ') . ", co.id as courseid, co.fullname as coursefullname, c.id as certificateid, c.name as certificatename, c.verifyany FROM {linkedincert} c JOIN {linkedincert_issues} ci ON c.id = ci.linkedincertid JOIN {course} co ON c.course = co.id JOIN {user} u ON ci.userid = u.id WHERE ci.code = :code";