Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
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 ($mform, $userid=0)
 Print out the customisable categories and fields for a users profile. More...
 
 profile_definition_after_data ($mform, $userid)
 Adds profile fields to user edit forms. More...
 
 profile_display_fields ($userid)
 Display profile fields. More...
 
 profile_get_custom_fields ($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 ($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 ($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 ($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 ($usernew)
 Saves profile data for a user. More...
 
 profile_signup_fields ($mform)
 Adds code snippet to a moodle form object for custom profile fields that should appear on the signup page. More...
 
 profile_user_record ($userid, $onlyinuserobject=true)
 Returns an object with the custom profile fields set for the given user. More...
 
 profile_validation ($usernew, $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...
 

Detailed Description

Profile field API library file.

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