|
|
|
@ -332,12 +332,32 @@ export class AuthService {
|
|
|
|
|
infoUser.uid = user.uid;
|
|
|
|
|
userRef.update(infoUser);
|
|
|
|
|
this.uploadModify(infoUser);
|
|
|
|
|
firebase.auth().onAuthStateChanged(function (userUpdate) {
|
|
|
|
|
userUpdate.updateEmail(infoUser.email);
|
|
|
|
|
userUpdate.updatePassword(infoUser.password);
|
|
|
|
|
if (userUpdate) {
|
|
|
|
|
console.log('userUpdate: ' + userUpdate);
|
|
|
|
|
} else {
|
|
|
|
|
console.log('pas user');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}else if (infoUser.status === 'Commercant') {
|
|
|
|
|
const userReff = this.databaseRef.child('Commercant').child(user.uid);
|
|
|
|
|
// var commercantInfo = infoUser;
|
|
|
|
|
infoUser.uid = user.uid;
|
|
|
|
|
userReff.update(infoUser);
|
|
|
|
|
this.uploadModify(infoUser);
|
|
|
|
|
firebase.auth().onAuthStateChanged(function (userUpdate) {
|
|
|
|
|
userUpdate.updateEmail(infoUser.email);
|
|
|
|
|
userUpdate.updatePassword(infoUser.password);
|
|
|
|
|
if (userUpdate) {
|
|
|
|
|
console.log('userUpdate: ' + userUpdate);
|
|
|
|
|
} else {
|
|
|
|
|
console.log('pas user');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|