Can I update user model from different model life cycle

module.exports = {
  lifecycles: {
    async afterUpdate(result, params, data) {
      //model was updated, now you can query the user's model to update it also.
      await strapi.query('user', 'users-permissions').update({ id:data.user }, {amount:10});
      //update function accepts two parameters, first one is used to identify the user and the second one is the Data that you want to update.
    },
  },
};