Can generate a password reset token

This commit is contained in:
2021-07-13 17:47:38 +02:00
parent 113c38daff
commit dcafcbb8e6
2 changed files with 79 additions and 3 deletions

View File

@ -71,4 +71,15 @@ export class ComunicUsersHelper {
new_mail: newEmail,
});
}
/**
* Create a password reset link for a user
*/
static async CreatePasswordRecoveryLink(id: number): Promise<string> {
return (
await serverRequest("users/create_password_reset_link", {
user_id: id,
})
).url;
}
}