Moodle APIs 3.11
Moodle 3.11.11+ (Build: 20221125)
Classes | Functions | Variables
lib.php File Reference

Profile field API library file. More...

Classes

class  profile_field_base
 Base class for the customisable profile fields. More...
 

Functions

 profile_definition (MoodleQuickForm $mform, int $userid=0)
 Print out the customisable categories and fields for a users profile. More...
 
 profile_definition_after_data (MoodleQuickForm $mform, int $userid)
 Adds profile fields to user edit forms. More...
 
 profile_display_fields ($userid)
 Display profile fields. More...
 
 profile_get_custom_field_data_by_shortname (string $shortname, bool $casesensitive=true)
 Gets basic data about custom profile fields. More...
 
 profile_get_custom_fields (bool $onlyinuserobject=false)
 Obtains a list of all available custom profile fields, indexed by id. More...
 
 profile_get_signup_fields ()
 Retrieves a list of profile fields that must be displayed in the sign-up form. More...
 
 profile_get_user_fields_with_data (int $userid)
 Returns an array of all custom field records with any defined data (or empty data), for the specified user id. More...
 
 profile_get_user_fields_with_data_by_category (int $userid)
 Returns an array of all custom field records with any defined data (or empty data), for the specified user id, by category. More...
 
 profile_has_required_custom_fields_set ($userid)
 Does the user have all required custom fields set? More...
 
 profile_load_custom_fields ($user)
 Load custom profile fields into user object. More...
 
 profile_load_data (stdClass $user)
 Loads user profile field data into the user object. More...
 
 profile_save_custom_fields ($userid, $profilefields)
 Save custom profile fields for a user. More...
 
 profile_save_data (stdClass $usernew)
 Saves profile data for a user. More...
 
 profile_signup_fields (MoodleQuickForm $mform)
 Adds code snippet to a moodle form object for custom profile fields that should appear on the signup page. More...
 
 profile_user_record (int $userid, bool $onlyinuserobject=true)
 Returns an object with the custom profile fields set for the given user. More...
 
 profile_validation (stdClass $usernew, array $files)
 Validates profile data. More...
 
 profile_view ($user, $context, $course=null)
 Trigger a user profile viewed event. More...
 

Variables

const PROFILE_VISIBLE_ALL '2'
 Visible to anyone who can view the user. More...
 
const PROFILE_VISIBLE_NONE '0'
 Only visible to users with the moodle/user:viewalldetails capability. More...
 
const PROFILE_VISIBLE_PRIVATE '1'
 Visible to the profile owner or anyone with the moodle/user:viewalldetails capability. More...
 
const PROFILE_VISIBLE_TEACHERS '3'
 Visible to anyone who has the moodle/site:viewuseridentity permission. More...
 

Detailed Description

Profile field API library file.

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