Having username as a path - Profiles 2 and Pathauto I have a problem with integrating the Pathauto and Profiles modules. Basically, I would like to have the username as URL, e.g. example.com/username. This should link to the profile page (not the account page). I know how to do it for account ([user:name]) however this method does not work for the profile patterns. There is only certain number of patterns available for profile paths and no username I am afraid. I tried node:author:name, but this doesnt work as well?

Can anyone help with this, or suggest any other solution?
you can automatically path save the user name when user access the user/uid page 
add a submit handler in form alter and 

$form['#submit'][1] = 'redirect_to_profile_username_page'; 


// here get the user name field

function redirect_to_profile_detail(&amp;$form, &amp;$form_state){
$uid = $form_state['build_info']['args'][0]-&gt;uid;
$user = user_load($uid);
$clean = $user-&gt;name;
      $Alias_1 = get_alias('source','user/'.$uid,1);
        $pathAlias = !empty($Alias_1) ? $Alias_1['alias'] : FALSE;
        if($pathAlias === FALSE){
                path_save($args = array("source" =&gt; 'user'.'/'.$uid,"alias" =&gt; $clean));
                $pathAlias = drupal_lookup_path('alias',$clean);
        }
       $form_state['redirect'] = $clean;
     }


this will redirect the user/uid page to that particular username as url page 

here we are creating a aliase for user/uid so when you access sitename/username that user profile page will be loaded.