Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lbplanner/services/user/get_all_users.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,18 @@ class user_get_all_users extends external_api {
*/
public static function get_all_users_parameters(): external_function_parameters {
return new external_function_parameters([
'vintage' => new external_value(PARAM_TEXT, 'The vintage to filter the users by', VALUE_DEFAULT, null),
'vintage' => new external_value(PARAM_TEXT, 'The vintage to filter the users by', VALUE_DEFAULT, null, NULL_ALLOWED),
]);
}

/**
* Gives back all users registered by the lbplanner app.
* @param string $vintage (optional) gives back all users with the given vintage
* @param ?string $vintage (optional) gives back all users with the given vintage
* @throws moodle_exception
* @throws dml_exception
* @throws invalid_parameter_exception
*/
public static function get_all_users(string $vintage): array {
public static function get_all_users(?string $vintage): array {
global $DB, $USER;

self::validate_parameters(self::get_all_users_parameters(), ['vintage' => $vintage]);
Expand Down
Loading