Details
-
Type:
Improvement
-
Status: Development in progress
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 3.8.1
-
Fix Version/s: None
-
Component/s: User management, Web Services
-
Labels:
-
Testing Instructions:
-
Workaround:
-
Affected Branches:MOODLE_38_STABLE
-
Pull from Repository:
-
Pull Master Branch:
-
Pull Master Diff URL:
Description
I created a plugin to have custom external webservices to create and update users with additional fields (such as optional phone1, department, institution, ...).
To do that, extending the class \core_user_external and overriding the method \core_user_external::create_users_parameters seems the right, good enough solution.
(user/externallib.php)
But the methods create_users and update_users do calls with self to:
- self::create_users_parameters()
- self::update_users_parameters()
Instead, they should call these methods with static:
- static::create_users_parameters()
- static::update_users_parameters()
This way, the extended method wouldn't be dead code.
Looks like a simple mistake, or just something that was not anticipated.
I tested the fix, and everything works perfect with it.
Diff: https://github.com/moodle/moodle/compare/master...liip-elearning:MDL-68034