Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
tool_moodlenet\profile_manager Class Reference

Class for handling interaction with the moodlenet profile. More...

Static Public Member Functions

static create_user_profile_category ()
 Create a custom user profile category to hold our custom field.
 
static create_user_profile_text_field (int $categoryid)
 Create a user profile field to hold the moodlenet profile information.
 
static get_category_name ()
 Gets the category name that is set for this site.
 
static get_moodlenet_profile_link (moodlenet_user_profile $moodlenetprofile)
 Given our $moodlenetprofile let's cURL the domains' WebFinger endpoint.
 
static get_moodlenet_user_profile (int $userid)
 Get the mnet profile for a user.
 
static get_profile_field_name ()
 Gets the unique profile field used to hold the moodle net profile.
 
static official_profile_exists ()
 Are we using the proper user profile field to hold the mnet profile?
 
static save_moodlenet_user_profile (moodlenet_user_profile $moodlenetprofile)
 Save the moodlenet profile.
 

Detailed Description

Class for handling interaction with the moodlenet profile.

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

Member Function Documentation

◆ create_user_profile_category()

static tool_moodlenet\profile_manager::create_user_profile_category ( )
static

Create a custom user profile category to hold our custom field.

Return values
intThe id of the created category.

◆ create_user_profile_text_field()

static tool_moodlenet\profile_manager::create_user_profile_text_field ( int $categoryid)
static

Create a user profile field to hold the moodlenet profile information.

Parameters
int$categoryidThe category to put this field into.

◆ get_category_name()

static tool_moodlenet\profile_manager::get_category_name ( )
static

Gets the category name that is set for this site.

Return values
stringThe category used to hold the moodle net profile field.

◆ get_moodlenet_profile_link()

static tool_moodlenet\profile_manager::get_moodlenet_profile_link ( moodlenet_user_profile $moodlenetprofile)
static

Given our $moodlenetprofile let's cURL the domains' WebFinger endpoint.

Parameters
moodlenet_user_profile$moodlenetprofileThe moodlenet profile to get info from.
Return values
array[bool, text, raw]

◆ get_moodlenet_user_profile()

static tool_moodlenet\profile_manager::get_moodlenet_user_profile ( int $userid)
static

Get the mnet profile for a user.

Parameters
int$useridThe ID for the user to get the profile form
Return values
moodlenet_user_profileor null.

◆ get_profile_field_name()

static tool_moodlenet\profile_manager::get_profile_field_name ( )
static

Gets the unique profile field used to hold the moodle net profile.

Return values
stringThe profile field name being used on this site.

◆ official_profile_exists()

static tool_moodlenet\profile_manager::official_profile_exists ( )
static

Are we using the proper user profile field to hold the mnet profile?

Return values
boolTrue if we are using a user table field for the mnet profile. False means we are using costom profile fields.

◆ save_moodlenet_user_profile()

static tool_moodlenet\profile_manager::save_moodlenet_user_profile ( moodlenet_user_profile $moodlenetprofile)
static

Save the moodlenet profile.

Parameters
moodlenet_user_profile$moodlenetprofileThe moodlenet profile to save.

The documentation for this class was generated from the following file: