createAccountByAdmin static method
Implementation
static Future<UserModel> createAccountByAdmin(String name, String email) async {
Map<String, dynamic> userData = {};
userData['name'] = name;
userData['email'] = email;
String pwd = generateTemporaryPassword(8);
logger.severe(pwd);
userData['password'] = pwd;
userData['userType'] = "gen_password";
userData['accountSignUpType'] = AccountSignUpType.hycop.index;
//userData['imagefile'] = _googleAccount!.photoUrl;
userData['isRemoved'] = false;
await createAccount(userData, autoLogin: false).then((value) {}).onError((error, stackTrace) {
throw HycopUtils.getHycopException(error: error, defaultMessage: 'createAccount error !!!');
});
return UserModel(userData: userData);
}