1 This files describes API changes for code that uses the user API.
5 * New method `core_user::is_current_user`, useful for components implementing permission callbacks for their preferences
6 * New `profile_get_user_field` method for returning profile field instance of given type
7 * The `profile_field_base::is_visible` method now accepts an optional `$context` argument
11 * Added a new method is_transform_supported() in the profile_field_base class.
12 The purpose is to allow the field to be transformed during the export process.
13 It has been implemented in the Date/Time data type (Applied in 4.1, 4.0.6).
15 * user_get_user_details_courses() now accepts an optional second parameter, an array of userfields that should be
16 returned. The values passed into the $userfields parameter must all be included in the return from
17 user_get_default_fields().
18 It also allows you to reduce how much of a user record is required by the method. The minimum user record fields are:
21 * all potential fullname fields
23 * Participant filter is moved to core as an API which can be used in different areas of core by implementing the API
24 and filterable objects. As a part of making the API mature as a core one, these are the js files moved from core
26 * user/amd/src/local/participantsfilter/filter.js → lib/amd/src/datafilter/filtertype.js
27 * user/amd/src/local/participantsfilter/filtertypes/country.js → lib/amd/src/datafilter/filtertypes/country.js
28 * user/amd/src/local/participantsfilter/filtertypes/courseid.js → lib/amd/src/datafilter/filtertypes/courseid.js
29 * user/amd/src/local/participantsfilter/filtertypes/keyword.js → lib/amd/src/datafilter/filtertypes/keyword.js
30 * user/amd/src/local/participantsfilter/selectors.js → lib/amd/src/datafilter/selectors.js
31 The following mustache have been moved from core user to core library:
32 * user/templates/local/participantsfilter/filterrow.mustache → lib/templates/datafilter/filter_row.mustache
33 * user/templates/local/participantsfilter/filtertype.mustache → lib/templates/datafilter/filter_type.mustache
34 * user/templates/local/participantsfilter/filtertypes.mustache → lib/templates/datafilter/filter_types.mustache
35 * user/templates/local/participantsfilter/autocomplete_layout.mustache → lib/templates/datafilter/autocomplete_layout.mustache
36 * user/templates/local/participantsfilter/autocomplete_selection.mustache → lib/templates/datafilter/autocomplete_selection.mustache
37 * user/templates/local/participantsfilter/autocomplete_selection_items.mustache → lib/templates/datafilter/autocomplete_selection_items.mustache
38 Class participant_filter now extends core filter api in core user.
40 * The unified_filter function has been finally deprecated and cannot be used anymore
41 * The class \core_user\output\unified_filter has been finally deprecated and removed
45 * External function core_user_external::update_users() will now fail on a per user basis. Previously if one user
46 update failed all users in the operation would fail.
47 * External function core_user_external::update_users() now returns an error code and message to why a user update
49 * New method `core_user\fields::get_sql_fullname` for retrieving user fullname format in SQL statement
50 * The `profile_get_custom_field_data_by_shortname` method now accepts an optional parameter to determine whether
51 to use case-sensitive matching of the profile field shortname or not (default true)
55 * Added new core_user/form_user_selector JS module that can be used as the 'ajax' handler for the autocomplete form
56 element implementing the user selector.
57 * Added new external function core_user_external::search_identity(). The main purpose of this external function is to
58 provide data for asynchronous user selectors and similar widgets. It allows to search users matching the given query
59 in their name or other available identity fields.
63 * The unified filter has been replaced by the participants filter. The following have therefore been deprecated:
65 * user_get_participants_sql
66 * user_get_total_participants
67 * user_get_participants
68 * Unified filter renderer (core_user_renderer::unified_filter)
69 * Unified filter renderable (\core_user\output\unified_filter)
70 * Unified filter JavaScript (core_user/unified_filter.js and core_user/unified_filter_datasource.js)
71 * Unified filter template (unified_filter.mustache)
75 * The following functions have been finally deprecated and can not be used anymore:
76 * useredit_update_picture()
77 * core_user_external::update_user_preferences() now allows to unset existing preferences values.
78 If the preference value field is not set, the preference will be unset.