user_service_interface
interface user_service_interface
Contract for User Management Service.
This service provides orchestration logic for user lifecycle operations. For simple user lookups (get_user, get_user_by_email, etc.), use the Support layer directly: \local_middag\framework\support\moodle\user
Methods
Create a new Moodle user with sensible defaults.
Update an existing Moodle user with validation.
Delete (soft-delete) a user with existence check.
Details
at line 49
int
create_user(stdClass $userobj, bool $updatepassword = false, bool $nologin = false)
Create a new Moodle user with sensible defaults.
This method applies default values for auth, confirmed, and mnethostid if not provided, then delegates to the Support layer.
at line 64
bool
update_user(stdClass $userobj, bool $updatepassword = true, bool $triggerevent = true)
Update an existing Moodle user with validation.
Validates that the user ID is present before delegating to Support.
at line 77
bool
delete_user(int $userid)
Delete (soft-delete) a user with existence check.
Verifies the user exists before attempting deletion.