moodle-local_datacleaner icon indicating copy to clipboard operation
moodle-local_datacleaner copied to clipboard

Moodle 4.3: get_all_user_name_fields() is deprecated

Open Ewa55 opened this issue 1 year ago • 1 comments

Hi, I tested the plugin on Moodle 4.3, but the following problem already appears in Moodle 4.1

Default exception handler: Coding error detected, it must be fixed by a programmer: get_all_user_name_fields() is deprecated. Please use the \core_user\fields API instead Debug: Error code: codingerror

  • line 2795 of /lib/deprecatedlib.php: coding_exception thrown
  • line 101 of /local/datacleaner/cli/lib.php: call to get_all_user_name_fields()
  • line 91 of /local/datacleaner/cli/clean.php: call to safety_checks()

!!! Coding error detected, it must be fixed by a programmer: get_all_user_name_fields() is deprecated. Please use the \core_user\fields API instead !!! !!

Ewa55 avatar Jan 26 '24 12:01 Ewa55

the solution is: \core_user\fields::get_name_fields()

Ewa55 avatar Jan 26 '24 12:01 Ewa55