You are here

function pathatuo_entity_alias_form_submit in Pathauto Entity 7

Add submit callback for profile2

1 string reference to 'pathatuo_entity_alias_form_submit'
pathauto_entity_alias_form in ./pathauto_entity.module
Uses for elements from the Path module

File

./pathauto_entity.module, line 501
Implements custom entity type support for Pathauto module.

Code

function pathatuo_entity_alias_form_submit(&$form, &$form_state) {

  // Add manually for Profile2
  if (module_exists('profile2')) {
    if ($form_state['entity_type'] == 'profile2' && $form_state['op'] == 'edit') {
      $form_state['profile2']->path = $form_state['values']['path'];
      pathauto_entity_entity_update($form_state['profile2'], 'profile2');
    }
  }
}