updateUserProfile
@svenvw/fdm-source / fdm-core/src / updateUserProfile
Function: updateUserProfile()
updateUserProfile(
fdm
,user_id
,firstname?
,surname?
,lang?
):Promise
<void
>
Defined in: fdm-core/src/authentication.ts:237
Updates the profile information of a user.
This function allows updating the first name, surname, and language preference of a user. It constructs an object containing only the fields that need to be updated and then performs the update operation. Additionally, it updates the display username if either the first name or surname is being updated.
Parameters
fdm
any
The FDM instance providing the connection to the database.
user_id
string
The ID of the user to update.
firstname?
string
(Optional) The new first name of the user.
surname?
string
(Optional) The new surname of the user.
lang?
"nl-NL"
(Optional) The new language preference of the user.
Returns
Promise
<void
>
A promise that resolves when the user's profile has been updated.
Throws
Throws an error if any database operation fails.