f62e7b4dbf58185fe1da13fdc0a480a4ae18979b
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d7 / hook / url_inbound_alter.twig
1 /**
2  * Implements hook_url_inbound_alter().
3  */
4 function {{ machine_name }}_url_inbound_alter(&$path, $original_path, $path_language) {
5   // Create the path user/me/edit, which allows a user to edit their account.
6   if (preg_match('|^user/me/edit(/.*)?|', $path, $matches)) {
7     global $user;
8     $path = 'user/' . $user->uid . '/edit' . $matches[1];
9   }
10 }