You just need to loop through the results of
GetAllRoles()
method result and then assign the available roles to the user. For example:
var roles = new RoleProvider().GetAllRoles(site.SiteID);
foreach (var role in roles){
UserInfoProvider.AddUserToRole(newUser.UserID, role.ID);
}
Note that the code above will assign all the roles to the user. If you want to add specific roles to the user, then you need do some checking first.