# Update user data in ionic

**URL:** <https://forum.ionicframework.com/t/update-user-data-in-ionic/187590>\
**Category:** Ionic Angular\
**Created:** [April 18, 2020, 9:58pm UTC](https://forum.ionicframework.com/t/update-user-data-in-ionic/187590 "2020-04-18T21:58:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Geelario](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Geelario](https://forum.ionicframework.com/u/Geelario)\
**Post date:** [April 18, 2020, 9:58pm UTC](https://forum.ionicframework.com/t/update-user-data-in-ionic/187590/1 "2020-04-18T21:58:49Z")

</div>

Good day everyone, Please I need your help on how to update a user data. I am new to angular and ionic. I have been able to retrieve user id from local storage, and also write a method that out the user new data, the problem I am having is how to update the user with the new data. This is my code below. Thanks.

```auto
// Update user info
  updateMethod(){

    // Retrieve user Id
    let isUserLoggedIn = localStorage.getItem('currentUserId');

    //this output user new info
    this.user = {
      first_name:this.user.first_name,
      last_name: this.user.last_name,
      username: this.user.username,
      email: this.user.email,
      billing: {
        phone: this.user.billing.phone,
        address_1: this.user.billing.address_1,
      }
   };
   console.log('new update', this.user);  
   //update user data
    this.WC.UpdateUser( isUserLoggedIn).then((data)=>{
         console.log('update successful', data);
       });

  }

```
