Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
enrol_lti\local\ltiadvantage\repository\user_repository Class Reference

Public Member Functions

 delete (int $id)
 Delete a user based on id.
 
 delete_by_deployment (int $deploymentid)
 Delete all lti user instances based on a given local deployment instance id.
 
 exists (int $id)
 Check whether or not the given user object exists.
 
 find (int $id)
 Find and return a user by id.
 
 find_by_resource (int $resourceid)
 Find all users for a particular shared resource.
 
 find_by_resource_link (int $resourcelinkid)
 Get a list of users associated with the given resource link.
 
 find_single_user_by_resource (int $userid, int $resourceid)
 Find an lti user instance by resource.
 
 save (user $user)
 Save a user instance in the store.
 

Member Function Documentation

◆ delete()

enrol_lti\local\ltiadvantage\repository\user_repository::delete ( int $id)

Delete a user based on id.

Parameters
int$idthe id of the user to remove.

◆ delete_by_deployment()

enrol_lti\local\ltiadvantage\repository\user_repository::delete_by_deployment ( int $deploymentid)

Delete all lti user instances based on a given local deployment instance id.

Parameters
int$deploymentidthe local id of the deployment instance to which the users belong.

◆ exists()

enrol_lti\local\ltiadvantage\repository\user_repository::exists ( int $id)

Check whether or not the given user object exists.

Parameters
int$idthe unique id the user.
Return values
booltrue if found, false otherwise.

◆ find()

enrol_lti\local\ltiadvantage\repository\user_repository::find ( int $id)

Find and return a user by id.

Parameters
int$idthe id of the user object.
Return values
user|nullthe user object, or null if the object cannot be found.

◆ find_by_resource()

enrol_lti\local\ltiadvantage\repository\user_repository::find_by_resource ( int $resourceid)

Find all users for a particular shared resource.

Parameters
int$resourceidthe id of the shared resource.
Return values
arraythe array of users, empty if none were found.

◆ find_by_resource_link()

enrol_lti\local\ltiadvantage\repository\user_repository::find_by_resource_link ( int $resourcelinkid)

Get a list of users associated with the given resource link.

Parameters
int$resourcelinkidthe id of the resource_link instance with which the users are associated.
Return values
arraythe array of users, empty if none were found.

◆ find_single_user_by_resource()

enrol_lti\local\ltiadvantage\repository\user_repository::find_single_user_by_resource ( int $userid,
int $resourceid )

Find an lti user instance by resource.

Parameters
int$useridthe id of the moodle user to look for.
int$resourceidthe id of the published resource.
Return values
user|nullthe lti user instance, or null if not found.

◆ save()

enrol_lti\local\ltiadvantage\repository\user_repository::save ( user $user)

Save a user instance in the store.

Parameters
user$userthe object to save.
Return values
userthe saved object.

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