Have a membership number that's unique to a user account

Hi All,

I'd like to have the functionality where a user can enter in a membership number (that's given from a physical membership card) and it validate it and and makes it unique to that user account.

What is the best way to do this?

Also, I'm running a multi-site if that helps.

Thanks