130 Commits

Author SHA1 Message Date
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
Andrew Nicols
dcfae879e9 MDL-51172 core: Adjust WS help strings 2015-09-24 15:37:12 +02:00
Juan Leyva
48a90a215b MDL-51415 webservice: Check course access using can_access_course()
This function check both user enrolled and course:view capabilities
2015-09-22 15:29:49 +02:00
Daniel Neis Araujo
e71a336cac MDL-51182 webservices: generate passwords and mail them to new users 2015-09-18 15:40:07 -03:00
Juan Leyva
1c2b788256 MDL-49796 webservices: Fix the functions description 2015-07-14 11:31:57 +02:00
Eloy Lafuente (stronk7)
522eff0d30 Merge branch 'MDL-49499-master' of git://github.com/jleyva/moodle 2015-04-07 17:29:15 +02:00
Juan Leyva
214102d09e MDL-49498 user: New external function core_user_view_user_list 2015-04-02 17:03:03 +02:00
Juan Leyva
94dcab769b MDL-49499 user: New external function core_user_view_user_profile 2015-04-02 16:57:43 +02:00
Juan Leyva
4bf3a71380 MDL-48443 webservices: Prevent duplicated user devices 2015-03-20 14:45:04 +01:00
Juan Leyva
3221718eda MDL-48716 webservices: New ws core_user_remove_user_device 2015-02-19 15:15:18 +01:00
David Monllao
5bb0ee2a7a MDL-43535 webservices: Adding missing deprecated WS
- enrol_manual needs a version bump to execute
  external_update_descriptions()
- core_user_get_users_by_id() is now also marked
  as deprecated
2015-02-12 10:13:36 +08:00
David Monllao
3c1aa6fdfb MDL-43535 webservices: Marking functions as deprecated
Also:
- We don't allow users to add deprecated functions to WS
- We show a debugging message when deprecated functions
  are already being used in web services.
2015-02-09 05:42:22 +08:00
Juan Leyva
a1bacaf13d MDL-45041 Web Service: add_user_device doesn't store entries for different users using the same push key 2014-07-25 10:35:24 +02:00
Rajesh Taneja
2b55cb1b18 MDL-45641 event: Option to trigger user event manually
On some pages full user data is not stored before user_created/
user_updated event is triggred. So giving option to trigger that
manually, so it can be triggred after all data is saved
2014-06-27 15:44:56 +08:00
Sam Hemelryk
a2ed6e69f9 MDL-44255 user: tidied up phpdocs and coding style 2014-02-24 09:23:47 +13:00
Mark Nelson
8bf0f20795 MDL-42932 core_calendar: introduced calendar type system setting 2013-12-09 18:40:46 -08:00