Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

List of users from the Privacy API Search functions.

Copyright: 2018 Andrew Nicols <andrew@nicols.co.uk>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 104 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

userlist:: (4 methods):
  add_from_sql()
  add_user()
  add_users()
  set_component()


Class: userlist  - X-Ref

List of users from the Privacy API Search functions.

add_from_sql(string $fieldname, string $sql, array $params)   X-Ref
Add a set of users from  SQL.

The SQL should only return a list of user IDs.

param: string  $fieldname The name of the field which holds the user id
param: string  $sql    The SQL which will fetch the list of * user IDs
param: array   $params The set of SQL parameters
return: $this

add_user(int $userid)   X-Ref
Adds the user user for a given user.

param: int     $userid
return: $this

add_users(array $userids)   X-Ref
Adds the user users for given users.

param: int[]   $userids
return: $this

set_component($component)   X-Ref
Sets the component for this userlist.

param: string  $component the frankenstyle component name.
return: $this