Custom url formatting

I observed that the CRUD generator associated to a particular model generates the following url: /controller/view/id/1, after the path is properly configured in the .htaccess file. I need that instead the number of the record (1,2…) a string to be displayed, maybe the user name in the following way: /controller/view/id/john. Is there any way to alter this default behavior?

A conclusive example will be very grateful. Thank you.