Trying to update PrivatMembersData with database

Hey, I am trying to build a solution to import users from one site to my wix site. ALl I need to import at this time is username (email) and password. I’ve been working on it for a min, the bigest issue is just trying to figure out how to pass a variable from the userDatabase to PrivateMembers.

This is what I have so far.

export function button3_click(event) {

  wixData.get("votingMembers", "loginEmail")
    .then((results) => {
 let email = results
      wixData.get("votingMembers", "password")
        .then((results1) => {
 let password = results1
          wixUsers.register(email, password)
            .then((result) => {
 let stays = result.status;
 "Active"
 let user = result.user;
            })
            .catch((err) => {
 let errorMsg = err;
            })
        })
 //    })
    })
}

I’m getting this message in chrome java console

  1. {message: “Email is empty”, details: {errorcode: “-19988”}}

  2. details: {errorcode: “-19988”}

  3. message: “Email is empty”

You can not add anything to the Wix Members app own collection as it is read only, you can see more about the apps own collection here.
https://support.wix.com/en/article/corvid-wix-members-privatemembersdata-collection-fields

Also, you should never be storing passwords in any dataset on your site, that should always be left for Wix to securely store when the user registers up, otherwise you are risking your site security and you would be liable for any data breach etc.

https://www.wix.com/corvid/reference/wix-data.html#get

get( )
Retrieves an item from a collection.

Description
The get() function returns a Promise that resolves to the item with ID itemId from the specified collection, or null if the itemId is not found. The Promise is rejected if the current user does not have read permissions for the collection.

As for the error message itself, you can see all about that here.
https://www.oraexcel.com/oracle-12cR1-ORA-19988

You can always import your contacts through the use of csv files as shown on this Wix Support page.
https://support.wix.com/en/article/importing-contacts-by-uploading-a-csv-file-1066522

You can’t pre-register users so to speak, they would still need to do it themselves.
https://www.wix.com/corvid/forum/community-discussion/importing-site-members-via-csv-file

Finally, you can always vote for the feature here.
https://support.wix.com/en/article/request-moving-members-from-one-site-to-another-in-your-wix-account#targetText=Currently,%20is%20it%20not%20possible,and%20import%20your%20member%20list

https://support.wix.com/en/article/request-manually-setting-contacts-as-site-members

That’s strange, I’ve been able to add users in code via wix.Users register() with an “Active” . Like the example in the corvid API library https://www.wix.com/corvid/reference/wix-users.html

import wixUsers from 'wix-users';

// ...

let email = // the user's email addresses
let password = // the user's password

wixUsers.register(email, password)
  .then( (result) => {
    let status = result.status; // "Active"
    let user = result.user;
  } );

I just need a way to pass the (“email”, “password”) variables there from my database to the register statement.

It will not work to have all of the users to reregister on their own. The migration is a mandatory need from the customer.

The database is only for migration purposes and is temporary, so holding passwords for five minutes are not an issue.

So no answer on how to carry variables?