How to create separate user types? I want to create separate user types. By "type", I don't mean just roles. Let me explain by an example. 

User comes to my website and he wants to register either as "User" or "Editor". Both these profiles will have very different fields and different permissions. 

Now, I can use profile2 module to create different profiles and restrict them to different roles. Furthermore, I can use Autoassignrole module to assign the desired role to the user during registration. This is all fine. 

Now, what I want is separate links for registration for both roles. When user clicks on any one of them, only the relevant "profile2" profile should be shown in the form. The problem is that on the default registration form, both profiles are shown. 

One could say that I could just uncheck the option in the "profile2" profiles and not show them during registration, and user can enter his profile after registration. But here is the thing: I want some of the profile fields to be entered during registration itself. This is required for my case.

So, now you get what I mean by "type"? It is surprising there is no straightforward solution to this basic functionality. How are you achieving this?
This should work (at least it did for me). Put this code in your template.php and adjust accordingly.

I created a user field called 'type' as a select list (for future consideration). You could just as easily use a hidden field or a text field if you don't want the user to be aware of a difference (NOT FOR SECURITY PURPOSES - THIS IS VERY INSECURE).
Make it mandatory.

given a url of mysite.com/user/register?type=one  this will assign the field named 'type' to 'one', otherwise
it will assign it 'two' by default.  

I added some comments to help with the code, but you can remove that later. Obviously you will need to adapt this to the profile selection - I don't profile2 setup on my test site so I can't really get into that, but this is the basics, and I can help guide through the rest. 

function theme_form_alter(&amp;$form, &amp;$form_state, $form_id) // change theme to your theme name
{
    if($form_id == 'user_register_form')  // only check on user registration form
    {
      $urlGet = drupal_get_query_parameters(); // get URL parameters ?type=one, etc
      if($urlGet['type'] == 'one') // check ?type= against expected
      {   
        $form['field_type']['und']['#options'] = array('One' =&gt; 'One'); // set select list option(s)
        //$form['field_type']['und']['#options'] = array('One' =&gt; 'One', 'Three' =&gt; 'Three'); // for multiple values
      } else
      {
        $form['field_type']['und']['#options'] = array('Two' =&gt; 'Two'); // default value
      }
    }
}