Assign Customer Portal Profile via Deluge script

Assign Customer Portal Profile via Deluge script

Would be great to be able to assign a profile to a customer portal user programmatically. 

By default they are assigned to the "Customer" profile. This gives them views of every from I have created. Not ideal at all.