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:
+1
-1
@@ -145,7 +145,7 @@ function badges_notify_badge_award(badge $badge, $userid, $issued, $filepathhash
|
||||
$userfrom = new stdClass();
|
||||
$userfrom->id = $admin->id;
|
||||
$userfrom->email = !empty($CFG->badges_defaultissuercontact) ? $CFG->badges_defaultissuercontact : $admin->email;
|
||||
foreach (get_all_user_name_fields() as $addname) {
|
||||
foreach (\core\user_fields::get_name_fields() as $addname) {
|
||||
$userfrom->$addname = !empty($CFG->badges_defaultissuername) ? '' : $admin->$addname;
|
||||
}
|
||||
$userfrom->firstname = !empty($CFG->badges_defaultissuername) ? $CFG->badges_defaultissuername : $admin->firstname;
|
||||
|
||||
Reference in New Issue
Block a user