-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added optional user profile fields #44
Conversation
department idnumber address institution url description city
Hi @DanielSunami! |
@@ -614,6 +614,14 @@ public function test_get_request_login_url_user_parameters_based_on_plugin_confi | |||
'lastname' => new external_value(PARAM_NOTAGS, 'The family name of the user', VALUE_OPTIONAL), | |||
'email' => new external_value(PARAM_RAW_TRIMMED, 'A valid and unique email address', VALUE_OPTIONAL), | |||
'username' => new external_value(PARAM_USERNAME, 'A valid and unique username', VALUE_OPTIONAL), | |||
|
|||
'department' => new external_value(PARAM_TEXT, 'Department of the user', VALUE_OPTIONAL), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those fields are still hardcoded. Can you please modify the code to be able to provide a list of any fields. An example of that in core could be found here https://github.com/moodle/moodle/blob/master/user/externallib.php#L105
So we would have similar here e.g. "extrafields" multiple structure with "name" and "value". There should be a validation before processing and If we receive an unknown field we should throw an exception.
Standard user fields should be a good start. In a future we can improve it to process custom userfields as well.
Also we would like to see unit tests with any of the code changes.
This one has been sitting here not touched for a long time. I'll close it off to clean up a list of PRs. However, opened #85 as I like the idea. |
No description provided.