Function: userById()
function userById(
context,
siteUrl,
userId
): Promise<User | undefined>;
Defined in: areas/site/users.ts:35
A user by id, or undefined when there's nobody: no such user, one the person may not see, or a
deleted account. Moodle keeps a deleted account's record and its user service still gives it to an
administrator, renamed, with the email replaced by an MD5 hash of the old username (delete_user,
confirmed empirically on the sandbox, 5.2); the driver treats it as gone.
Parameters
| Parameter | Type |
|---|---|
context | BrowserContext |
siteUrl | string |
userId | number |
Returns
Promise<User | undefined>