145 Commits

Author SHA1 Message Date
Ilya Tregubov
8ab87b3fc4
Merge branch 'MDL-78196-master' of https://github.com/jleyva/moodle 2023-06-01 10:39:30 +08:00
Paul Holden
10b6f979c5
MDL-62859 user: export methods for manipulating user preferences in JS. 2023-05-22 13:51:37 +01:00
Juan Leyva
e13a2ff501 MDL-78196 user: Fix files used space check 2023-05-10 17:16:18 +02:00
Juan Leyva
964ad9d264 MDL-77893 airnotifier: Allow to set publickey when creating new device 2023-04-17 11:03:15 +02:00
Marina Glancy
8fc1486d36 MDL-77164 various: fix incorrect phpdocs 2023-04-13 11:35:06 +01:00
Sara Arjona
09171a3c3a Merge branch 'MDL-77726-master' of https://github.com/jleyva/moodle 2023-03-30 16:56:56 +02:00
Juan Leyva
fc97f32010 MDL-73226 files: Add quota checks to core_user_add_user_private_files 2023-03-27 13:11:46 +02:00
Juan Leyva
76807203a3 MDL-77726 user: Fix custom user profiles supporting filtering in WS 2023-03-23 18:08:03 +01:00
Andrew Nicols
a3cc26f8bb MDL-76583 core: Update uses of external_* classes 2023-01-19 07:34:09 +08:00
Jun Pataleta
2924075480 MDL-76803 lang: Update usages of reworded email display options 2023-01-10 16:01:18 +08:00
Pau Ferrer Ocaña
d195956f3a MDL-67853 message: Translate user message preference from restore and WS 2022-01-27 15:22:15 +01:00
Matt Porritt
8281261b5a MDL-69194 user: make core_user_update_users return warnings
Add unit test coverage for the new warning scenarios.
2021-06-08 01:24:48 +00:00
Vitaly Potenko
6e7d77d11c MDL-69194 user: make core_user_update_users return warnings
The external function 'core_user_update_users()' always returned 'null' no matter
if a user or users were successfully updated or there were some failures.
So, there was no way for the caller to know which users were updated and which were not.
After the commit changes the function returns an 'external_warnings' instance. The function uses
a delegated transaction for each user to update within a loop. This enables the function to update
as many users as possible. This differs from the previous behavior of the function when it used
a delegate transaction outside of the loop where the users were updated. This resulted in a rollback
of the whole users updating in case any of the users had some invalid data. For each user within a loop
a 'try-catch' block is used to throw exceptions which are actually returned
as warnings by the function when they are caught.
2021-06-07 05:44:49 +00:00
Bas Brands
f9e1c2587a MDL-28452 core_user: migrate social profile fields
Create a new profile field type, move all existing content of the fields
'icq', 'skype', 'aim', 'yahoo', 'msn' and 'url' in the mdl_user table to
theses new profile fields if needed.

AMOS BEGIN
MOV [aimid,core],[aimid,courseimage,profilefield_social]
MOV [yahooid,core],[yahooid,profilefield_social]
MOV [skypeid,core],[skypeid,profilefield_social]
MOV [icqnumber,core],[icqnumber,profilefield_social]
MOV [msnid,core],[msnid,profilefield_social]
MOV [webpage,core],[webpage,profilefield_social]
AMOS END
2021-04-21 11:22:25 +02:00
Sara Arjona
489cae2601 MDL-61215 core_user: use the new optimised_image filetype group
For the user profile picture (instead of the web_image which includes
SVG files).
2020-08-14 17:06:23 +02:00
Jun Pataleta
c1ff94f41e MDL-64774 user: Make email query case-insensitive 2019-03-01 23:29:00 +08:00
Jun Pataleta
eb1a477635 MDL-62922 core_user: Check auth mechanism before validating password
* External authentication mechanisms (e.g. via oauth2, etc.) don't store
  password in the user table, so we shouldn't be requiring password in
  such case when creating users via the core_user_create_users WS
  function.
2018-12-05 15:29:54 +08:00
Juan Leyva
2979ca1175 MDL-63929 user: Support unsetting prefs in update_user_preferences WS 2018-11-09 09:28:23 +01:00
Jake Dallimore
8981ac0197 Merge branch 'MDL-62657-master' of git://github.com/junpataleta/moodle 2018-08-29 09:30:07 +08:00
Jun Pataleta
69781cdae1 MDL-62657 user: More users fields for creation/update WS functions 2018-08-21 12:08:20 +08:00
David Mudrák
0e99d58c35 MDL-63174 user: core_user_create_users to throw exception on empty names
To be consistent with the web administration UI, we should not allow to
create invalid user records with empty username, lastname or firstname
via the web services.
2018-08-17 13:24:31 +02:00
Marina Glancy
1727c939ba MDL-61477 admin: sitepolicy handler API
- Define sitepolicy handler manager class, base class and the core handler
- Allow to set a plugin as sitepolicyhandler that implements the sitepolicy API
- Modify web services to return information from the 3rd party handler instead of core if needed
2018-03-15 11:32:55 +08:00
Damyon Wiese
a571aa9b85 Merge branch 'wip-MDL-59876-master' of git://github.com/abgreeve/moodle 2017-11-15 10:35:30 +01:00
Adrian Greeve
2c97abeff2 MDL-59876 core_user: Add required library for function.
The external service create_users has a function call to
useredit_update_user_preference() that requires editlib.php
2017-11-15 11:43:19 +08:00
Juan Leyva
abdb8f59a5 MDL-59876 webservice: Fix the user preference name field type
Web Services from user and enrol components has been updated to change
the user preference name field type from PARAM_ALPHANUMEXT to
PARAM_RAW.
The old type was not matching the core functionality.
2017-11-07 16:44:48 +01:00
Juan Leyva
8c4d7cee79 MDL-51945 core_user: Prevent duplicated emails in update_users WS 2017-10-30 17:42:03 +01:00
Juan Leyva
e71687baf9 MDL-60198 webservice: Add missing MOODLE_INTERNAL checks 2017-09-21 13:01:28 +02:00
Mark Nelson
93b47710ac MDL-59977 core: do not directly check 'viewparticipant' capability 2017-09-11 12:44:27 +08:00
Andrew Nicols
abc25c01b8 MDL-50925 auth_imap: Remove from core and into plugins DB 2017-07-18 14:49:08 +08:00
Juan Leyva
f74ac6e704 MDL-58712 core_user: New WS core_user_get_private_files_info 2017-06-15 09:40:30 +01:00
Marina Glancy
6e65554ea1 MDL-58010 user: allow to update only whitelisted user preferences 2017-03-10 18:04:47 +00:00
Juan Leyva
42778e124e MDL-56065 user: Fix update_users Web Service
Users won’t be updated if:
- They are admins and the user updating is not
- They are the guest user
- They are mnet users
- They are deleted users
2016-11-10 16:15:31 +08:00
Andrew Solomon
511db62153 MDL-31465 core_user: Incorporate user suspension into webservices 2016-10-14 10:13:49 +08:00
Mark Nelson
c598f278ca MDL-55942 core_message: removed WS function core_user_update_user
This function was ignoring any capabilities and was only used to
update the preferences, but could be potentially used to update
any user attribute. A new WS function has been introduced to
handle user preferences with the necessary capability checks.
2016-10-07 16:26:40 +08:00
Ryan Wyllie
34eb5fcb60 MDL-54698 message: move general settings from preference page 2016-10-07 16:26:40 +08:00
Ryan Wyllie
a0eabdd3c8 MDL-54698 message: make preferences page ajax save 2016-10-07 16:26:40 +08:00
Juan Leyva
3e8145a37a MDL-56126 user: New WS core_user_agree_site_policy
This commit includes a change in moodlelib to throw the
sitepolicynotagreed exception in a way that can be captured and
identified by external systems.
2016-10-04 10:20:59 +01:00
Juan Leyva
649777fb8d MDL-55347 user: New WS core_user_set_users_preferences 2016-10-03 10:22:07 +01:00
Juan Leyva
d44e2e42dc MDL-56070 user: New Web Service core_user_update_picture 2016-09-23 12:54:23 +01:00
Juan Leyva
45fec98358 MDL-55266 user: New WS core_user_get_user_preferences 2016-07-28 12:08:58 +02:00
Juan Leyva
6e7bf3963b MDL-54869 webservice: Fix core_user_add_user_private_files 2016-07-05 09:01:35 +01:00
Russell Smith
5407c5b0f4 MDL-51789 users: Allow picture update from webservices.
useredit_update_picture as moved to user_update_picture
as it's more general.  It was also moved to user/lib.php
so it can be used by both webservices and edit without more include files.
2016-06-21 16:36:53 +10:00
David Monllao
537e08ac03 MDL-49414 user: Fixing unmanaged conflict 2016-04-29 12:18:01 +01:00
Cameron Ball
f23e9b6ba4 MDL-49414 webservices: Remove deprecated functions 2016-04-27 15:54:38 +08:00
Simey Lameze
ac9768fc1b MDL-52781 core_user: replace direct PARAM_ usages.
This commit replace as much as possible of clean_param and PARAM_ usages related to user object.
Also few unit tests has been changed to match the new validation
2016-04-21 15:24:36 +08:00
Damyon Wiese
5267d632ff MDL-52954 assign: Fixes to webservices and context.
This patch gets the behat tests passing again - but only with MDL-53772 in the branch.
2016-04-13 21:23:50 +08:00
David Monllao
9ccc372917 MDL-52610 user: Honour allowaccountssameemail in create_users ws
Credit to Dmitriy Kuzevanov.
2016-01-12 13:54:48 +08:00
Eloy Lafuente (stronk7)
c75b891ba7 Merge branch 'MDL-49821-master-master' of git://github.com/jleyva/moodle 2015-10-01 01:26:58 +02:00
David Monllao
161649644d Merge branch 'MDL-51415-master' of git://github.com/jleyva/moodle 2015-09-30 14:15:29 +08:00
Juan Leyva
4485f7c549 MDL-49821 webservice: Add active user checks in external functions 2015-09-25 11:33:13 +02:00