how can i attach a taxonomy to the users profile? I use drupal 7 and need to attach a certain taxonomy to a user. there is module for drupal 6 but as i see there is no module for that in drupal 7. how can i do that in my module by coding?

why do i have this question: i sell some digital files and now i am developing a module for selling my files. i want to sell them this way: each file has a certain taxonomy. when my user buys that file he or she gets that taxonomy. once he clicks on download link i have to check whether that user has that taxonomy already or not!
Users in Drupal 7 are proper entities and fieldable.

Goto Administration » Configuration » People » Account settings » Manage Fields (admin/config/people/accounts/fields)

Add a new Field.  Choose a label, and choose Term Reference as the field type.  Configure as needed.  This should identical for how you do it for a Content Type (ie, a node).

The click on the Manage Fields tab.  Set up the display for how you need it.

Edit you users, and add in some field data.  It will be in the full loaded $user object, and you can use it in Views over Users.