$fn.resetPassword(param)
Reset application authenticated user passwords."asynchronous"
Arguments
Name | Type | Description |
---|---|---|
param | object | Information about the user whose password is to be reset |
param details
Property | Type | Description |
---|---|---|
string | ||
password | string | Temporary password |
Return value
Type | Description |
---|---|
Promise | Password reset user information |
Object | Property | Type | Description |
---|---|---|---|
User | userId | string | User ID (GUID) |
string | |||
name | string | Name | |
custom_01 | string | Custom Attribute 1 | |
custom_02 | string | Custom Attribute 2 | |
custom_03 | string | Custom Attribute 3 | |
custom_04 | string | Custom Attribute 4 | |
custom_05 | string | Custom Attribute 5 | |
custom_06 | string | Custom Attribute 6 | |
custom_07 | string | Custom Attribute 7 | |
custom_08 | string | Custom Attribute 8 | |
custom_09 | string | Custom Attribute 9 | |
custom_10 | string | Custom Attribute 10 | |
enabled | boolean | Enable/Disable | |
created | string | Creation date and time | |
updated | string | Update date and time | |
status | string | User Status |
Sample
try { /* CSV content * ------------------------------------ * "email","password" * "user01@test.co.jp","Password@01" * "user02@test.co.jp","Password@02" * ------------------------------------ */ const file = await $fn.getFile('/resetPassword.csv'); const buffer = file.data; const resetPWInfos = $fn.csvToObject(buffer); // reset password for (let resetPWInfo of resetPWInfos) { await $fn.resetPassword(resetPWInfo); }} catch(err) { console.log("Error", err);}