How to set the behavior for Pathauto when a duplicate exists? I'm creating a Drupal 7 site which will consist of information about many different organizations across North America. The profiles will be submitted by the organizations themselves and it is very likely that there will be duplicate names.

What I'd like to do is have Pathauto create the url: orgs/OrganizationName for the first such organization and after this create: orgs/OrganizationName-City.

Is there any way to change how Pathauto behaves when duplicates are found?
You could create a module and use the hook_pathauto_alias_alter function to override the path alias before saving it.

function mymodule_pathauto_alias_alter(&amp;$alias, &amp;$context) {

  $temp = $alias;
  $newalias = pathauto_alias_uniquify($temp, $context['source'], $context['language']);
  if ($newalias !=$alias)
  {
    $alias .= $context['data']['node']-&gt;field_city[$context['data']['node']-&gt;language][0]['value'];
  }

}


The pathauto_alias_uniquify function checks if there is an alias already existing and if it does then would return the updated alias and if not return the same alias. now the one you get it different from the one we already have then we would could append the city name to the alias. 

I have created a field called city with a field machine name field_city you will have to change your values accordingly.