Search moodle.org's
Developer Documentation


/user/ -> externallib.php (summary)

External user API

Copyright: 2009 Petr Skodak
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 1415 lines (62 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes


Class: core_user_external  - X-Ref

User external functions

create_users_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

create_users($users)   X-Ref
Create one or more users.

param: array $users An array of users to create.
return: array An array of arrays

create_users_returns()   X-Ref
Returns description of method result value

return: external_description

delete_users_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

delete_users($userids)   X-Ref
Delete users

param: array $userids
return: null

delete_users_returns()   X-Ref
Returns description of method result value

return: null

update_users_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

update_users($users)   X-Ref
Update users

param: array $users
return: null

update_users_returns()   X-Ref
Returns description of method result value

return: null

get_users_by_field_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

get_users_by_field($field, $values)   X-Ref
Get user information for a unique field.

param: string $field
param: array $values
return: array An array of arrays containg user profiles.

get_users_by_field_returns()   X-Ref
Returns description of method result value

return: external_multiple_structure

get_users_parameters()   X-Ref
Returns description of get_users() parameters.

return: external_function_parameters

get_users($criteria = array()   X-Ref
Retrieve matching user.

param: array $criteria the allowed array keys are id/lastname/firstname/idnumber/username/email/auth.
return: array An array of arrays containing user profiles.

get_users_returns()   X-Ref
Returns description of get_users result value.

return: external_description

get_users_by_id_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

get_users_by_id($userids)   X-Ref
Get user information
- This function is matching the permissions of /user/profil.php
- It is also matching some permissions from /user/editadvanced.php for the following fields:
auth, confirmed, idnumber, lang, theme, timezone, mailformat

param: array $userids  array of user ids
return: array An array of arrays describing users

get_users_by_id_returns()   X-Ref
Returns description of method result value

return: external_description

get_course_user_profiles_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

get_course_user_profiles($userlist)   X-Ref
Get course participant's details

param: array $userlist  array of user ids and according course ids
return: array An array of arrays describing course participants

get_course_user_profiles_returns()   X-Ref
Returns description of method result value

return: external_description

user_description($additionalfields = array()   X-Ref
Create user return value description.

param: array $additionalfields some additional field
return: single_structure_description

add_user_private_files_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

add_user_private_files($draftid)   X-Ref
Copy files from a draft area to users private files area.

param: int $draftid Id of a draft area containing files.
return: array An array of warnings

add_user_private_files_returns()   X-Ref
Returns description of method result value

return: external_description

add_user_device_parameters()   X-Ref
Returns description of method parameters.

return: external_function_parameters

add_user_device($appid, $name, $model, $platform, $version, $pushid, $uuid)   X-Ref
Add a user device in Moodle database (for PUSH notifications usually).

param: string $appid The app id, usually something like com.moodle.moodlemobile.
param: string $name The device name, occam or iPhone etc.
param: string $model The device model Nexus4 or iPad1.1 etc.
param: string $platform The device platform iOs or Android etc.
param: string $version The device version 6.1.2 or 4.2.2 etc.
param: string $pushid The device PUSH token/key/identifier/registration id.
param: string $uuid The device UUID.
return: array List of possible warnings.

add_user_device_returns()   X-Ref
Returns description of method result value.

return: external_multiple_structure

Class: moodle_user_external  - X-Ref

Deprecated user external functions

create_users_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

create_users($users)   X-Ref
Create one or more users

param: array $users  An array of users to create.
return: array An array of arrays

create_users_returns()   X-Ref
Returns description of method result value

return: external_description

delete_users_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

delete_users($userids)   X-Ref
Delete users

param: array $userids
return: null

delete_users_returns()   X-Ref
Returns description of method result value

return: null

update_users_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

update_users($users)   X-Ref
Update users

param: array $users
return: null

update_users_returns()   X-Ref
Returns description of method result value

return: null

get_users_by_id_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

get_users_by_id($userids)   X-Ref
Get user information
- This function is matching the permissions of /user/profil.php
- It is also matching some permissions from /user/editadvanced.php for the following fields:
auth, confirmed, idnumber, lang, theme, timezone, mailformat

param: array $userids  array of user ids
return: array An array of arrays describing users

get_users_by_id_returns()   X-Ref
Returns description of method result value

return: external_description

get_course_participants_by_id_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

get_course_participants_by_id($userlist)   X-Ref
Get course participant's details

param: array $userlist  array of user ids and according course ids
return: array An array of arrays describing course participants

get_course_participants_by_id_returns()   X-Ref
Returns description of method result value

return: external_description

get_users_by_courseid_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

get_users_by_courseid($courseid, $options)   X-Ref
Get course participants details

param: int $courseid  course id
param: array $options options {
return: array An array of users

get_users_by_courseid_returns()   X-Ref
Returns description of method result value

return: external_description

Search This Site: