Assign custom id for user on registering I need to assign custom ids for all users. The Id will come from API and its depend on other filled by user custom field. Witch hook should I use and witch variable holds id value?
I presume you're referring to a login ID - you should be able to use hook_form_alter to access the registration form, and create a default value.

get Devel module and use dpm($form) in that function to look through the array to find the exact element you want to change.

after that you can probably use a number of options to hide the element, including css so that the user can't change it before being submitted.