Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
communication_matrix\matrix_user_manager Class Reference

Static Public Member Functions

static create_matrix_user_profile_fields ()
 Insert "Communication" category and "matrixuserid" field.
 
static get_formatted_matrix_home_server ()
 Sets home server for user matrix id.
 
static get_formatted_matrix_userid (string $username,)
 Get a qualified matrix user id based on a Moodle username.
 
static get_matrixid_from_moodle (int $userid,)
 Gets matrix user id from moodle.
 
static set_matrix_userid_in_moodle (int $userid, string $matrixuserid,)
 Add user's Matrix user id.
 

Public Attributes

const MATRIX_USER_PREFIX = 'user'
 Prefix for Matrix usernames when they are detected as numeric.
 

Static Protected Member Functions

static get_profile_field_name ()
 Get the profile field name, creating the profiel field if it does not exist.
 
static load_requirements ()
 Load requirements for profile field management.
 

Member Function Documentation

◆ create_matrix_user_profile_fields()

static communication_matrix\matrix_user_manager::create_matrix_user_profile_fields ( )
static

Insert "Communication" category and "matrixuserid" field.

Return values
string

◆ get_formatted_matrix_home_server()

static communication_matrix\matrix_user_manager::get_formatted_matrix_home_server ( )
static

Sets home server for user matrix id.

Return values
string

◆ get_formatted_matrix_userid()

static communication_matrix\matrix_user_manager::get_formatted_matrix_userid ( string $username)
static

Get a qualified matrix user id based on a Moodle username.

Parameters
string$usernameThe moodle username to turn into a Matrix username
Return values
string

◆ get_matrixid_from_moodle()

static communication_matrix\matrix_user_manager::get_matrixid_from_moodle ( int $userid)
static

Gets matrix user id from moodle.

Parameters
int$useridMoodle user id
Return values
string|null

◆ get_profile_field_name()

static communication_matrix\matrix_user_manager::get_profile_field_name ( )
staticprotected

Get the profile field name, creating the profiel field if it does not exist.

Return values
string

◆ load_requirements()

static communication_matrix\matrix_user_manager::load_requirements ( )
staticprotected

Load requirements for profile field management.

This is just a helper to keep loading legacy files isolated.

◆ set_matrix_userid_in_moodle()

static communication_matrix\matrix_user_manager::set_matrix_userid_in_moodle ( int $userid,
string $matrixuserid )
static

Add user's Matrix user id.

Parameters
int$useridMoodle user id
string$matrixuseridMatrix user id

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