this looks like just what I'm after... but I'm having a little bit of trouble getting it up and going on 4.0.12.
first I think you missed the following database change:
ALTER TABLE `xcart_customers` ADD `profile` INT( 11 ) DEFAULT '0' NOT NULL ;
secondly... I now get a sql error when I try and add a new profile along the lines of
INVALID SQL: 1064 : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'A'";}' where sessid='15558c80e44a16a535a6f2cdd9cda4d8'' at line ... blah blah... too much to paste in here