When a user (e.g. nid = 37) goes to some other user's profile page at a url like /user/1, /user/2, ..., /user/n, I want automatically redirect them to their own: /user/37 page.
How can I do properly this with Drupal 8?
I think I must create a custom Controller Class and configure the default drupal route (/user/{uid}) adding my custom Controller, but I don't know how can I do this.