MDL-54858 user: Final deprecation of useredit_update_picture
authorMihail Geshoski <mihail@moodle.com>
Thu, 19 Jul 2018 02:34:44 +0000 (10:34 +0800)
committerMihail Geshoski <mihail@moodle.com>
Mon, 30 Jul 2018 01:13:20 +0000 (09:13 +0800)
Credit to Ankit Agarwal.

user/editlib.php
user/upgrade.txt [new file with mode: 0644]

index b387464..f22e2cb 100644 (file)
@@ -184,21 +184,12 @@ function useredit_update_user_preference($usernew) {
 }
 
 /**
- * Updates the provided users profile picture based upon the expected fields returned from the edit or edit_advanced forms.
- *
- * @deprecated since Moodle 3.2 MDL-51789 - please use core_user::update_picture() instead.
- * @todo MDL-54858 This will be deleted in Moodle 3.6.
+ * @deprecated since Moodle 3.2
  * @see core_user::update_picture()
- *
- * @global moodle_database $DB
- * @param stdClass $usernew An object that contains some information about the user being updated
- * @param moodleform $userform The form that was submitted to edit the form (unused)
- * @param array $filemanageroptions
- * @return bool True if the user was updated, false if it stayed the same.
  */
-function useredit_update_picture(stdClass $usernew, moodleform $userform, $filemanageroptions = array()) {
-    debugging('useredit_update_picture() is deprecated. Please use core_user::update_picture() instead.', DEBUG_DEVELOPER);
-    return core_user::update_picture($usernew, $filemanageroptions);
+function useredit_update_picture() {
+    throw new coding_exception('useredit_update_picture() can not be used anymore. Please use ' .
+        'core_user::update_picture() instead.');
 }
 
 /**
diff --git a/user/upgrade.txt b/user/upgrade.txt
new file mode 100644 (file)
index 0000000..c82a29a
--- /dev/null
@@ -0,0 +1,6 @@
+This files describes API changes for code that uses the user API.
+
+=== 3.6 ===
+
+* The following functions have been finally deprecated and can not be used anymore:
+  * useredit_update_picture()