I want to create a custom user, when I click the button it does not do any action. Can anyone help?
import wixUsers from ‘wix-users’;
import wixLocation from ‘wix-location’;
// …
$w(‘#buttonregister’).onClick( () => {
wixUsers.register($w(‘#email’).value, $w(‘#password’).value, {
contactInfo: {
“firstName”: $w(‘#firstName’).value,
“lastName”: $w(‘#lastName’).value,
“emails”: $w(‘#email’).value,
“phone”: $w(‘#phone’).value,
“birthday”: $w(‘#birthday’).value,
}
} )
.then( (result) => {
let status = result.status; // “Active”
let user = result.user;
wixLocation.to(“/account/customer”);
} );
});