Question:
hello everyone,
I have a little problem, which, I suppose can be solved here.
I have a page where I can add new contacts. That works great, no pb.
The pb is that they are automatically save as members also. I don’t want that : only a contact NOT a member.
1/ is there a way to save them only as a contact? (Note as member)
2/ How to delete this member in velo code?
Product:
Wix Editor
**What have you already tried:
import { authentication } from ‘wix-members-frontend’;
import {session} from ‘wix-storage’;
import wixData from ‘wix-data’;
import wixUsers from ‘wix-users’;let emails = ;
$w(‘#Register’).onClick((event) => {
// Vérifier si les MDP concordent.
if($w(‘#CfrmPassword’).value !== $w(‘#Password’).value){
console.log(‘Les MDP ne concordent pas’);
$w(‘#Recap’).show();
$w(‘#Recap’).html = `Attention, vos mots de passe sont différents.Merci de vérifier votre saisie…
-} else {
console.log(‘les MDP concordent bien’);
$w(‘#Recap’).show();
$w(‘#Recap’).html = `Enregistrement de vos informations en cours. Merci de patienter, vous serez automatiquement redirigé vers le site …
-
$w(‘#Register’).show()const password = $w(‘#Password’).value;
const email = $w(‘#Email’).value;
emails.push(email);let options = {
contactInfo: {
firstName: $w(‘#PrenomClt’).value,
lastName: $w(‘#NomClt’).value,
emails: emails,
},
privacyStatus: ‘PUBLIC’
}authentication.register(email, password, options)
.then((registrationResult) => {
console.log(‘L enregistrement du nouveau client a bien été validé.:’, registrationResult);
console.log('Email client : ', email);session.setItem(‘MailClt’, $w(‘#Email’).value);
console.log($w(‘#Email’).value)})
.catch((error) => {
console.error(error);
});
}});
thank you very much for your help