MDL-45242 Lib: Replace calls to deprecated functions
In all cases changes have been kept to a minimum while not making the code completely horrible. For example, there are many instances where it would probably be better to rewrite a query entirely, but I have not done that (in order to reduce the risk of changes).
This commit is contained in:
@@ -66,7 +66,8 @@ class riskadmin extends check {
|
||||
*/
|
||||
public function get_result(): result {
|
||||
global $DB, $CFG;
|
||||
$userfields = \user_picture::fields('u');
|
||||
$userfieldsapi = \core\user_fields::for_userpic();
|
||||
$userfields = $userfieldsapi->get_sql('u', false, '', '', false)->selects;
|
||||
$sql = "SELECT $userfields
|
||||
FROM {user} u
|
||||
WHERE u.id IN ($CFG->siteadmins)";
|
||||
|
||||
Reference in New Issue
Block a user