I am using angularFire in its latest version 2.0.1, but I see information on how to update information as "displayName" try to obtain user information with firebase.User()
but I get error "getApi" I am misguided quisas how to update the information a user created earlier
-
which firebase version are you using ?– YmmanuelCommented Jun 3, 2016 at 17:01
-
I'm using the latest version sdk 3.0– Luis Ruiz FigueroaCommented Jun 3, 2016 at 18:06
Add a comment
|
1 Answer
I found a solution for this problem. You can do the following:
var user = firebase.auth().currentUser;
user.updateProfile({
displayName: vm.form.username
}).then(function(response) {
//Success
}, function(error) {
//Error
console.log(error);
});