|
|
|
@ -91,7 +91,11 @@ export class EnvoyerCarteComponent implements OnInit, OnDestroy {
|
|
|
|
|
|
|
|
|
|
const config = {apiKey: 'AIzaSyD2O5MxwZ4BRWvVc77FZliBvtj0pmcdzos',
|
|
|
|
|
authDomain: 'webappparrain.firebaseapp.com',
|
|
|
|
|
databaseURL: 'https://webappparrain.firebaseio.com'};
|
|
|
|
|
databaseURL: 'https://webappparrain.firebaseio.com',
|
|
|
|
|
projectId: 'webappparrain',
|
|
|
|
|
storageBucket: 'webappparrain.appspot.com',
|
|
|
|
|
messagingSenderId: '808271162007'
|
|
|
|
|
};
|
|
|
|
|
this.secondaryApp = null;
|
|
|
|
|
this.secondaryApp = firebase.apps.length <= 1 ? firebase.initializeApp(config, 'Secondary') : firebase.app('Secondary');
|
|
|
|
|
|
|
|
|
@ -269,16 +273,16 @@ export class EnvoyerCarteComponent implements OnInit, OnDestroy {
|
|
|
|
|
|
|
|
|
|
parNewlistTemp.forEach(par => {
|
|
|
|
|
par.forEach(elementParTemp => {
|
|
|
|
|
if (elementParTemp !== undefined) {
|
|
|
|
|
if (elementParTemp !== undefined && elementParTemp.email === parrainTemp.email) {
|
|
|
|
|
if (elementParTemp.uid !== '') {
|
|
|
|
|
this.getIdParrain(elementParTemp.uid);
|
|
|
|
|
this.creerCartePar();
|
|
|
|
|
this.carteEnvoieEncours = true;
|
|
|
|
|
this.carteEnvoieOK = true;
|
|
|
|
|
this.echecRegisterPar = false;
|
|
|
|
|
this.secondaryApp.auth().sendPasswordResetEmail(elementParTemp.email);
|
|
|
|
|
this.secondaryApp.auth().currentUser.sendEmailVerification();
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.secondaryApp.auth().sendPasswordResetEmail(elementParTemp.email);
|
|
|
|
|
this.secondaryApp.auth().currentUser.sendEmailVerification();
|
|
|
|
|
this.secondaryApp.auth().signOut();
|
|
|
|
|
this.carteEnvoieEncours = false;
|
|
|
|
|
this.goToOpComm();
|
|
|
|
|