$fn.resetPassword(param)
アプリケーションの認証ユーザのパスワードをリセットします。[非同期]
引数
名前 | 型 | 説明 |
---|---|---|
param | object | パスワードリセットするユーザの情報 |
param詳細
プロパティ | 型 | 説明 |
---|---|---|
string | Eメール | |
password | string | 一時パスワード |
戻り値
型 | 説明 |
---|---|
Promise<User> | パスワードリセットしたユーザ情報 |
オブジェクト | プロパティ | 型 | 説明 |
---|---|---|---|
User | userId | string | ユーザID (GUID) |
string | Eメール | ||
name | string | 名前 | |
custom_01 | string | カスタム属性1 | |
custom_02 | string | カスタム属性2 | |
custom_03 | string | カスタム属性3 | |
custom_04 | string | カスタム属性4 | |
custom_05 | string | カスタム属性5 | |
custom_06 | string | カスタム属性6 | |
custom_07 | string | カスタム属性7 | |
custom_08 | string | カスタム属性8 | |
custom_09 | string | カスタム属性9 | |
custom_10 | string | カスタム属性10 | |
enabled | boolean | 有効/無効 | |
created | string | 作成日時 | |
updated | string | 更新日時 | |
status | string | ユーザのステータス |
サンプル
try { /* CSV の内容 * ------------------------------------ * "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); // リセットパスワード for (let resetPWInfo of resetPWInfos) { await $fn.resetPassword(resetPWInfo); }} catch(err) { console.log("Error", err);}