security.getUserEmail deprecated
Get the email address of a user from their user id.
Deprecated
Use userSecurity.users.get(userId).getEmail() instead.
js
security.getUserEmail(userId)Parameters
| Parameter | Type | Description |
|---|---|---|
userId | number | User ID |
Returns
stringThe user's email address, or null if the user was not found.
Examples
js
const email = security.getUserEmail(1234); // "jane.doe@example.com"