updateUsername() { this.user.updateProfile({ displayName: this.username }) .then(() => { this.username = ''; this.presentToast('Username updated', false, 'bottom', 1000); this.error = ''; }) .catch(err => { console.log(` failed ${err}`); this.error = err.message; }); } updateImage() { this.user.updateProfile({ photoURL: `https://picsum.photos/id/${this.image}/200/200` }) .then(() => { this.image = null; this.presentToast('Image updated', false, 'bottom', 1000); this.error = ''; }) .catch(err => { console.log(` failed ${err}`); this.error = err.message; }); }