Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
core_user

Topics

 external
 
 
 test
 
 
 user
 
 

Directories

directory field
  
 

Namespaces

namespace  core_user
  
 
namespace  core_user\analytics\indicator
 User profile set indicator.
 
namespace  core_user\external
  
 
namespace  core_user\form
 Form to edit a users preferred language.
 
namespace  core_user\hook
  
 
namespace  core_user\output
 Class for rendering user filters on the course participants page.
 
namespace  core_user\output\myprofile
 Defines a category in my profile page navigation.
 
namespace  core_user\privacy
 Privacy class for requesting user data.
 
namespace  core_user\reportbuilder\datasource
  
 
namespace  core_user\search
 Index teachers in a course.
 
namespace  core_user\table
  
 

Classes

class  core_user\analytics\indicator\user_profile_set
 User profile set indicator. More...
 
class  core_user\analytics\indicator\user_track_forums
 User tracks forums indicator. More...
 
class  core_user\external\user_summary_exporter
 Class for exporting a user summary from an stdClass. More...
 
class  core_user\fields
 Class for retrieving information about user fields that are needed for displaying user identity. More...
 
class  core_user\form\calendar_form
 Class user_edit_calendar_form. More...
 
class  core_user\form\contactsitesupport_form
 Contact site support form. More...
 
class  core_user\form\contentbank_user_preferences_form
 Form to edit a user's preferences concerning the content bank. More...
 
class  core_user\form\defaulthomepage_form
 Form class. More...
 
class  core_user\form\private_files
 Manage user private area files form. More...
 
class  core_user\form\profile_category_form
 Modal form to edit profile category. More...
 
class  core_user\form\profile_field_form
 Class field_form used for profile fields. More...
 
class  core_user\hook\after_login_completed
 Allow plugins to callback as soon possible after user has completed login. More...
 
class  core_user\output\myprofile\manager
 Defines MAnager class for myprofile navigation tree. More...
 
class  core_user\output\myprofile\node
 Defines a node in my profile page navigation. More...
 
class  core_user\output\myprofile\renderer
 Report log renderer's for printing reports. More...
 
class  core_user\output\participants_filter
 Class for rendering user filters on the course participants page. More...
 
class  core_user\output\status_field
 Class containing the data for the status field. More...
 
class  core_user\output\user_roles_editable
 Class to display list of user roles. More...
 
class  core_user\privacy\provider
 Privacy class for requesting user data. More...
 
class  core_user\reportbuilder\datasource\users
 Users datasource. More...
 
class  core_user\search\course_teacher
 Search for user role assignment in a course. More...
 
class  core_user\search\user
 Search area for Users for whom I have access to view profile. More...
 
class  core_user\table\participants
 Class for the displaying the participants table. More...
 
class  core_user\table\participants_search
 Class used to fetch participants based on a filterset. More...
 
class  core_user_renderer
 Provides user rendering functionality such as printing private files tree and displaying a search utility. More...
 
class  group_members_selector
 User selector subclass for the list of users who are in a certain group. More...
 
class  group_non_members_selector
 User selector subclass for the list of users who are not in a certain group. More...
 
class  groups_user_selector_base
 Base class to avoid duplicating code. More...
 
class  profile_define_base
 This file contains the profile_define_base class. More...
 
class  user_edit_editor_form
 Class user_edit_editor_form. More...
 
class  user_edit_form
 Class user_edit_form. More...
 
class  user_edit_forum_form
 Class user_edit_forum_form. More...
 
class  user_edit_language_form
 Class user_edit_form. More...
 
class  user_editadvanced_form
 Class user_editadvanced_form. More...
 
class  user_filter_anycourses
 User filter to distinguish users with no or any enroled courses. More...
 
class  user_selector_base
 Base class for user selectors. More...
 

Functions

 can_view_user_details_cap ($user, $course=null)
 Check if $USER have the necessary capabilities to obtain user details.
 
 cancel_email_update ($userid)
 This file contains function used when editing a users profile and preferences.
 
 core_user_inplace_editable ($itemtype, $itemid, $newvalue)
 Callback for inplace editable API.
 
 profile_delete_category ($id)
 Delete a profile category.
 
 profile_delete_field ($id)
 Deletes a profile field.
 
 profile_list_categories ()
 Retrieve a list of categories and ids suitable for use in a form.
 
 profile_list_datatypes ()
 Retrieve a list of all the available data types.
 
 profile_move_category ($id, $move)
 Change the sort order of a category.
 
 profile_move_field ($id, $move)
 Change the sort order of a field.
 
 profile_purge_user_fields_cache ()
 Purge the cache for the user profile fields.
 
 profile_reorder_categories ()
 Reorder the profile categoriess starting at the category at the given startorder.
 
 profile_reorder_fields ()
 Reorder the profile fields within a given category starting at the field at the given startorder.
 
 profile_save_category (stdClass $data)
 Create or update a profile category.
 
 profile_save_field (stdClass $data, array $editors)
 Save updated field definition or create a new field.
 
 user_add_password_history (int $userid, #[\SensitiveParameter] string $password)
 Add password to the list of used hashes for this user.
 
 user_can_view_profile ($user, $course=null, $usercontext=null)
 Check if the current user has permission to view details of the supplied user.
 
 user_convert_text_to_menu_items ($text, $page)
 Converts a string into a flat array of menu items, where each menu items is a stdClass with fields type, url, title.
 
 user_count_login_failures ($user, $reset=true)
 Count the number of failed login attempts for the given user, since last successful login.
 
 user_create_user ($user, $updatepassword=true, $triggerevent=true)
 Creates a user.
 
 user_delete_user ($user)
 Marks user deleted in internal user database and notifies the auth plugin.
 
 user_edit_map_field_purpose ($userid, $fieldname)
 Map an internal field name to a valid purpose from: "https://www.w3.org/TR/WCAG21/#input-purposes".
 
 user_get_course_lastaccess_sql ($accesssince=null, $tableprefix='ul', $haveaccessed=false)
 Returns SQL that can be used to limit a query to a period where the user last accessed / did not access a course.
 
 user_get_default_fields ()
 Returns the list of default 'displayable' fields.
 
 user_get_lastaccess_sql ($columnname, $accesssince, $tableprefix, $haveaccessed=false)
 Returns SQL that can be used to limit a query to a period where the user last accessed or did not access something recorded by a given table.
 
 user_get_tagged_users ($tag, $exclusivemode=false, $fromctx=0, $ctx=0, $rec=1, $page=0)
 Returns users tagged with a specified tag.
 
 user_get_user_details ($user, $course=null, array $userfields=array())
 Give user record from mdl_user, build an array contains all user details.
 
 user_get_user_details_courses ($user, array $userfields=[])
 Tries to obtain user details, either recurring directly to the user's system profile or through one of the user's course enrollments (course profile).
 
 user_get_user_lastaccess_sql ($accesssince=null, $tableprefix='u', $haveaccessed=false)
 Returns SQL that can be used to limit a query to a period where the user last accessed / did not access the system.
 
 user_get_user_navigation_info ($user, $page, $options=array())
 Get a list of essential user navigation items.
 
 user_get_users_by_id ($userids)
 Get users by id.
 
 user_is_previously_used_password ($userid, $password)
 Was this password used before on change or reset password page?
 
 user_list_view ($course, $context)
 Trigger user_list_viewed event.
 
 user_mygrades_url ($userid=null, $courseid=SITEID)
 Returns the url to use for the "Grades" link in the user navigation.
 
 user_page_type_list ($pagetype, $parentcontext, $currentcontext)
 Return a list of page types.
 
 user_remove_user_device ($uuid, $appid="")
 Remove a user device from the Moodle database (for PUSH notifications usually).
 
 user_update_device_public_key (string $uuid, string $appid, string $publickey)
 Update the users public key for the specified device and app.
 
 user_update_user ($user, $updatepassword=true, $triggerevent=true)
 Update a user with a user object (will compare against the ID)
 
 useredit_get_disabled_name_fields ($enabledadditionalusernames=null)
 Gets user name fields not enabled from the setting fullnamedisplay.
 
 useredit_get_enabled_name_fields ()
 Gets enabled (from fullnameformate setting) user name fields in appropriate order.
 
 useredit_get_required_name_fields ()
 Return required user name fields for forms.
 
 useredit_load_preferences (&$user, $reload=true)
 Loads the given users preferences into the given user object.
 
 useredit_setup_preference_page ($userid, $courseid)
 Performs the common access checks and page setup for all user preference pages.
 
 useredit_shared_definition (&$mform, $editoroptions, $filemanageroptions, $user)
 Powerful function that is used by edit and editadvanced to add common form elements/rules/etc.
 
 useredit_update_bounces ($user, $usernew)
 Updates the user email bounce + send counts when the user is edited.
 
 useredit_update_interests ($user, $interests)
 Updates a users interests.
 
 useredit_update_picture ()
 
 useredit_update_trackforums ($user, $usernew)
 Updates the forums a user is tracking when the user is edited.
 
 useredit_update_user_preference ($usernew)
 Updates the user preferences for the given user.
 

Variables

global core_user\table::$CFG
 
 core_user\form::if (!defined( 'MOODLE_INTERNAL'))
 
 if (!defined( 'MOODLE_INTERNAL'))
 Form to edit a users profile.
 
 if (!defined( 'MOODLE_INTERNAL'))
 Form for editing a users profile.
 
 if (!defined( 'MOODLE_INTERNAL'))
 Form to edit a users editor preferences.
 
 if (!defined( 'MOODLE_INTERNAL'))
 Form to edit a users forum preferences.
 
 if (!defined( 'MOODLE_INTERNAL'))
 Form to edit a users preferred language.
 
const PROFILE_VISIBLE_ALL '2'
 Visible to anyone who can view the user.
 
const PROFILE_VISIBLE_NONE '0'
 Only visible to users with the moodle/user:viewalldetails capability.
 
const PROFILE_VISIBLE_PRIVATE '1'
 Visible to the profile owner or anyone with the moodle/user:viewalldetails capability.
 
const PROFILE_VISIBLE_TEACHERS '3'
 Profile field API library file.
 
const USER_FILTER_ENROLMENT 1
 External user API.
 
const USER_FILTER_GROUP 2
 
const USER_FILTER_LAST_ACCESS 3
 
const USER_FILTER_ROLE 4
 
const USER_FILTER_STATUS 5
 
const USER_FILTER_STRING 6
 
const USER_SELECTOR_DEFAULT_ROWS 20
 Code for ajax user selectors.
 

Detailed Description

Function Documentation

◆ can_view_user_details_cap()

can_view_user_details_cap ( $user,
$course = null )

Check if $USER have the necessary capabilities to obtain user details.

Parameters
stdClass$user
stdClass$courseif null then only consider system profile otherwise also consider the course's profile.
Return values
booltrue if $USER can view user details.

◆ cancel_email_update()

cancel_email_update ( $userid)

This file contains function used when editing a users profile and preferences.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later Cancels the requirement for a user to update their email address.
Parameters
int$userid

◆ core_user_inplace_editable()

core_user_inplace_editable ( $itemtype,
$itemid,
$newvalue )

Callback for inplace editable API.

Parameters
string$itemtype- Only user_roles is supported.
string$itemid- Courseid and userid separated by a :
string$newvalue- json encoded list of roleids.
Return values
core\output\inplace_editable|null

◆ profile_delete_category()

profile_delete_category ( $id)

Delete a profile category.

Parameters
int$idof the category to be deleted
Return values
boolsuccess of operation

◆ profile_delete_field()

profile_delete_field ( $id)

Deletes a profile field.

Parameters
int$id

◆ profile_list_categories()

profile_list_categories ( )

Retrieve a list of categories and ids suitable for use in a form.

Return values
array

◆ profile_list_datatypes()

profile_list_datatypes ( )

Retrieve a list of all the available data types.

Return values
arraya list of the datatypes suitable to use in a select statement

◆ profile_move_category()

profile_move_category ( $id,
$move )

Change the sort order of a category.

Parameters
int$idof the category
string$movedirection of move
Return values
boolsuccess of operation

◆ profile_move_field()

profile_move_field ( $id,
$move )

Change the sort order of a field.

Parameters
int$idof the field
string$movedirection of move
Return values
boolsuccess of operation

◆ profile_save_category()

profile_save_category ( stdClass $data)

Create or update a profile category.

Parameters
stdClass$data

◆ profile_save_field()

profile_save_field ( stdClass $data,
array $editors )

Save updated field definition or create a new field.

Parameters
stdClass$datadata from the form profile_field_form
array$editorseditors for this form field type

◆ user_add_password_history()

user_add_password_history ( int $userid,
# string $password[\SensitiveParameter] )

Add password to the list of used hashes for this user.

This is supposed to be used from: 1/ change own password form 2/ password reset process 3/ user signup in auth plugins if password changing supported

Parameters
int$useriduser id
string$passwordplaintext password
Return values
void

◆ user_can_view_profile()

user_can_view_profile ( $user,
$course = null,
$usercontext = null )

Check if the current user has permission to view details of the supplied user.

This function supports two modes: If the optional $course param is omitted, then this function finds all shared courses and checks whether the current user has permission in any of them, returning true if so. If the $course param is provided, then this function checks permissions in ONLY that course.

Parameters
object$userThe other user's details.
object$courseif provided, only check permissions in this course.
context$usercontextThe user context if available.
Return values
booltrue for ability to view this user, else false.

◆ user_convert_text_to_menu_items()

user_convert_text_to_menu_items ( $text,
$page )

Converts a string into a flat array of menu items, where each menu items is a stdClass with fields type, url, title.

Parameters
string$textthe menu items definition
moodle_page$pagethe current page
Return values
array

◆ user_count_login_failures()

user_count_login_failures ( $user,
$reset = true )

Count the number of failed login attempts for the given user, since last successful login.

Parameters
int | stdclass$useruser id or object.
bool$resetResets failed login count, if set to true.
Return values
intnumber of failed login attempts since the last successful login.

◆ user_create_user()

user_create_user ( $user,
$updatepassword = true,
$triggerevent = true )

Creates a user.

Exceptions
moodle_exception
Parameters
stdClass | array$useruser to create
bool$updatepasswordif true, authentication plugin will update password.
bool$triggereventset false if user_created event should not be triggred. This will not affect user_password_updated event triggering.
Return values
intid of the newly created user

◆ user_delete_user()

user_delete_user ( $user)

Marks user deleted in internal user database and notifies the auth plugin.

Also unenrols user from all roles and does other cleanup.

Todo
Decide if this transaction is really needed (look for internal TODO:)
Parameters
object$userUserobject before delete (without system magic quotes)
Return values
booleansuccess

◆ user_edit_map_field_purpose()

user_edit_map_field_purpose ( $userid,
$fieldname )

Map an internal field name to a valid purpose from: "https://www.w3.org/TR/WCAG21/#input-purposes".

Parameters
integer$userid
string$fieldname
Return values
string\$purpose(empty string if there is no mapping).

◆ user_get_course_lastaccess_sql()

user_get_course_lastaccess_sql ( $accesssince = null,
$tableprefix = 'ul',
$haveaccessed = false )

Returns SQL that can be used to limit a query to a period where the user last accessed / did not access a course.

Parameters
int$accesssinceThe unix timestamp to compare to users' last access
string$tableprefix
bool$haveaccessedWhether to match against users who HAVE accessed since $accesssince (optional)
Return values
string

◆ user_get_default_fields()

user_get_default_fields ( )

Returns the list of default 'displayable' fields.

Contains database field names but also names used to generate information, such as enrolledcourses

Return values
arrayof user fields

◆ user_get_lastaccess_sql()

user_get_lastaccess_sql ( $columnname,
$accesssince,
$tableprefix,
$haveaccessed = false )

Returns SQL that can be used to limit a query to a period where the user last accessed or did not access something recorded by a given table.

Parameters
string$columnnameThe name of the access column to check against
int$accesssinceThe unix timestamp to compare to users' last access
string$tableprefixThe query prefix of the table to check
bool$haveaccessedWhether to match against users who HAVE accessed since $accesssince (optional)
Return values
string

◆ user_get_tagged_users()

user_get_tagged_users ( $tag,
$exclusivemode = false,
$fromctx = 0,
$ctx = 0,
$rec = 1,
$page = 0 )

Returns users tagged with a specified tag.

Parameters
core_tag_tag$tag
bool$exclusivemodeif set to true it means that no other entities tagged with this tag are displayed on the page and the per-page limit may be bigger
int$fromctxcontext id where the link was displayed, may be used by callbacks to display items in the same context first
int$ctxcontext id where to search for records
bool$recsearch in subcontexts as well
int$page0-based number of page being displayed
Return values
core_tag\output\tagindex

◆ user_get_user_details()

user_get_user_details ( $user,
$course = null,
array $userfields = array() )

Give user record from mdl_user, build an array contains all user details.

Warning: description file urls are 'webservice/pluginfile.php' is use. it can be changed with $CFG->moodlewstextformatlinkstoimagesfile

Exceptions
moodle_exception
Parameters
stdClass$useruser record from mdl_user
stdClass$coursemoodle course
array$userfieldsrequired fields
Return values
array|null

◆ user_get_user_details_courses()

user_get_user_details_courses ( $user,
array $userfields = [] )

Tries to obtain user details, either recurring directly to the user's system profile or through one of the user's course enrollments (course profile).

You can use the $userfields parameter to reduce the amount of a user record that is required by the method. The minimum user fields are:

  • id
  • deleted
  • all potential fullname fields
Parameters
stdClass$userThe user.
array$userfieldsAn array of userfields to be returned, the values must be a subset of user_get_default_fields (optional)
Return values
arrayif unsuccessful or the allowed user details.

◆ user_get_user_lastaccess_sql()

user_get_user_lastaccess_sql ( $accesssince = null,
$tableprefix = 'u',
$haveaccessed = false )

Returns SQL that can be used to limit a query to a period where the user last accessed / did not access the system.

Parameters
int$accesssinceThe unix timestamp to compare to users' last access
string$tableprefix
bool$haveaccessedWhether to match against users who HAVE accessed since $accesssince (optional)
Return values
string

◆ user_get_user_navigation_info()

user_get_user_navigation_info ( $user,
$page,
$options = array() )

Get a list of essential user navigation items.

Parameters
stdclass$useruser object.
moodle_page$pagepage object.
array$optionsassociative array. options are:
  • avatarsize=35 (size of avatar image)
Return values
stdClass\$returnobjnavigation information object, where:
 $returnobj->navitems    array    array of links where each link is a
                                  stdClass with fields url, title, and
                                  pix
 $returnobj->metadata    array    array of useful user metadata to be
                                  used when constructing navigation;
                                  fields include:

     ROLE FIELDS
     asotherrole    bool    whether viewing as another role
     rolename       string  name of the role

     USER FIELDS
     These fields are for the currently-logged in user, or for
     the user that the real user is currently logged in as.

     userid         int        the id of the user in question
     userfullname   string     the user's full name
     userprofileurl moodle_url the url of the user's profile
     useravatar     string     a HTML fragment - the rendered
                               user_picture for this user
     userloginfail  string     an error string denoting the number
                               of login failures since last login

     "REAL USER" FIELDS
     These fields are for when asotheruser is true, and
     correspond to the underlying "real user".

     asotheruser        bool    whether viewing as another user
     realuserid         int        the id of the user in question
     realuserfullname   string     the user's full name
     realuserprofileurl moodle_url the url of the user's profile
     realuseravatar     string     a HTML fragment - the rendered
                                   user_picture for this user

     MNET PROVIDER FIELDS
     asmnetuser            bool   whether viewing as a user from an
                                  MNet provider
     mnetidprovidername    string name of the MNet provider
     mnetidproviderwwwroot string URL of the MNet provider

◆ user_get_users_by_id()

user_get_users_by_id ( $userids)

Get users by id.

Parameters
array$useridsid of users to retrieve
Return values
array

◆ user_is_previously_used_password()

user_is_previously_used_password ( $userid,
$password )

Was this password used before on change or reset password page?

The $CFG->passwordreuselimit setting determines how many times different password needs to be used before allowing previously used password again.

Parameters
int$useriduser id
string$passwordplaintext password
Return values
booltrue if password reused

◆ user_list_view()

user_list_view ( $course,
$context )

Trigger user_list_viewed event.

Parameters
stdClass$coursecourse object
stdClass$contextcourse context object
Since
Moodle 2.9

◆ user_mygrades_url()

user_mygrades_url ( $userid = null,
$courseid = SITEID )

Returns the url to use for the "Grades" link in the user navigation.

Parameters
int$useridThe user's ID.
int$courseidThe course ID if available.
Return values
mixedA URL to be directed to for "Grades".

◆ user_page_type_list()

user_page_type_list ( $pagetype,
$parentcontext,
$currentcontext )

Return a list of page types.

Parameters
string$pagetypecurrent page type
stdClass$parentcontextBlock's parent context
stdClass$currentcontextCurrent context of block
Return values
array

◆ user_remove_user_device()

user_remove_user_device ( $uuid,
$appid = "" )

Remove a user device from the Moodle database (for PUSH notifications usually).

Parameters
string$uuidThe device UUID.
string$appidThe app id. If empty all the devices matching the UUID for the user will be removed.
Return values
booltrue if removed, false if the device didn't exists in the database
Since
Moodle 2.9

◆ user_update_device_public_key()

user_update_device_public_key ( string $uuid,
string $appid,
string $publickey )

Update the users public key for the specified device and app.

Parameters
string$uuidThe device UUID.
string$appidThe app id, usually something like com.moodle.moodlemobile.
string$publickeyThe app generated public key.
Return values
bool
Since
Moodle 4.2

◆ user_update_user()

user_update_user ( $user,
$updatepassword = true,
$triggerevent = true )

Update a user with a user object (will compare against the ID)

Exceptions
moodle_exception
Parameters
stdClass | array$userthe user to update
bool$updatepasswordif true, authentication plugin will update password.
bool$triggereventset false if user_updated event should not be triggred. This will not affect user_password_updated event triggering.

◆ useredit_get_disabled_name_fields()

useredit_get_disabled_name_fields ( $enabledadditionalusernames = null)

Gets user name fields not enabled from the setting fullnamedisplay.

Parameters
array$enabledadditionalusernamesCurrent enabled additional user name fields.
Return values
arrayDisabled user name fields.

◆ useredit_get_enabled_name_fields()

useredit_get_enabled_name_fields ( )

Gets enabled (from fullnameformate setting) user name fields in appropriate order.

Return values
arrayEnabled user name fields.

◆ useredit_get_required_name_fields()

useredit_get_required_name_fields ( )

Return required user name fields for forms.

Return values
arrayrequired user name fields in order according to settings.

◆ useredit_load_preferences()

useredit_load_preferences ( & $user,
$reload = true )

Loads the given users preferences into the given user object.

Parameters
stdClass$userThe user object, modified by reference.
bool$reload

◆ useredit_setup_preference_page()

useredit_setup_preference_page ( $userid,
$courseid )

Performs the common access checks and page setup for all user preference pages.

Parameters
int$useridThe user id to edit taken from the page params.
int$courseidThe optional course id if we came from a course context.
Return values
arraycontaining the user and course records.

◆ useredit_shared_definition()

useredit_shared_definition ( & $mform,
$editoroptions,
$filemanageroptions,
$user )

Powerful function that is used by edit and editadvanced to add common form elements/rules/etc.

Parameters
MoodleQuickForm$mform
array$editoroptions
array$filemanageroptions
stdClass$user

◆ useredit_update_bounces()

useredit_update_bounces ( $user,
$usernew )

Updates the user email bounce + send counts when the user is edited.

Parameters
stdClass$userThe current user object.
stdClass$usernewThe updated user object.

◆ useredit_update_interests()

useredit_update_interests ( $user,
$interests )

Updates a users interests.

Parameters
stdClass$user
array$interests

◆ useredit_update_picture()

useredit_update_picture ( )
Deprecated
since Moodle 3.2
See also
core_user\update_picture()

◆ useredit_update_trackforums()

useredit_update_trackforums ( $user,
$usernew )

Updates the forums a user is tracking when the user is edited.

Parameters
stdClass$userThe original user object.
stdClass$usernewThe updated user object.

◆ useredit_update_user_preference()

useredit_update_user_preference ( $usernew)

Updates the user preferences for the given user.

Only preference that can be updated directly will be updated here. This method is called from various WS updating users and should be used when updating user details. Plugins may list preferences that can be updated by defining 'user_preferences' callback, {

See also
core_user\fill_preferences_cache()}

Some parts of code may use user preference table to store internal data, in these cases it is acceptable to call set_user_preference()

Parameters
stdClass | array$usernewobject or array that has user preferences as attributes with keys starting with preference_

Variable Documentation

◆ if [1/5]

if(!defined('MOODLE_INTERNAL')) ( ! defined 'MOODLE_INTERNAL')

Form to edit a users profile.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

◆ if [2/5]

if(!defined('MOODLE_INTERNAL')) ( ! defined 'MOODLE_INTERNAL')

Form for editing a users profile.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

◆ if [3/5]

if(!defined('MOODLE_INTERNAL')) ( ! defined 'MOODLE_INTERNAL')

Form to edit a users editor preferences.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

◆ if [4/5]

if(!defined('MOODLE_INTERNAL')) ( ! defined 'MOODLE_INTERNAL')

Form to edit a users forum preferences.

These are stored as columns in the user table, which is why they are in /user and not /mod/forum.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

◆ if [5/5]

if(!defined('MOODLE_INTERNAL')) ( ! defined 'MOODLE_INTERNAL')

Form to edit a users preferred language.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

◆ PROFILE_VISIBLE_ALL

const PROFILE_VISIBLE_ALL '2'

Visible to anyone who can view the user.

Editable by the profile owner if they have the moodle/user:editownprofile capability or any user with the moodle/user:update capability.

◆ PROFILE_VISIBLE_NONE

const PROFILE_VISIBLE_NONE '0'

Only visible to users with the moodle/user:viewalldetails capability.

Only editable by users with the moodle/user:viewalldetails and moodle/user:update capabilities.

◆ PROFILE_VISIBLE_PRIVATE

const PROFILE_VISIBLE_PRIVATE '1'

Visible to the profile owner or anyone with the moodle/user:viewalldetails capability.

Editable by the profile owner if they have the moodle/user:editownprofile capability or any user with moodle/user:viewalldetails and moodle/user:update capabilities.

◆ PROFILE_VISIBLE_TEACHERS

const PROFILE_VISIBLE_TEACHERS '3'

Profile field API library file.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later Visible to anyone who has the moodle/site:viewuseridentity permission. Editable by the profile owner if they have the moodle/user:editownprofile capability or any user with the moodle/user:update capability.

◆ USER_FILTER_ENROLMENT

const USER_FILTER_ENROLMENT 1

External user API.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

◆ USER_SELECTOR_DEFAULT_ROWS

const USER_SELECTOR_DEFAULT_ROWS 20

Code for ajax user selectors.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later The default size of a user selector.