You are here

function pmperson_migrate_get_help_text in Drupal PM (Project Management) 8

Same name and namespace in other branches
  1. 7.3 pmperson/includes/pmperson.migrate.inc \pmperson_migrate_get_help_text()
  2. 7.2 pmperson/includes/pmperson.migrate.inc \pmperson_migrate_get_help_text()

Provides help text data for pmperson migration conflicts form.

1 call to pmperson_migrate_get_help_text()
_pmperson_migrate_adjust_row in pmperson/includes/pmperson.migrate.inc
Custom function to map row values to display values.

File

pmperson/includes/pmperson.migrate.inc, line 354
Migration functions for the PM Person module.

Code

function pmperson_migrate_get_help_text($row_data) {
  $message = '-';
  $du = $row_data['user'];
  $pmp = $row_data['pmperson'];
  if ($pmp['linked_id'] == NULL and $du['linked_id'] == NULL and $du['mail'] == $pmp['mail']) {
    $message = t('Clicking <b>"Adjust pmperson nodes"</b> button should fix this issue');
  }
  if ($pmp['linked_id'] == NULL and $du['linked_id'] != NULL and $du['mail'] == $pmp['mail']) {
    $message = t('Since drupal user is already associated with another PM Person,
    it is highly recommended to <b>change PM Person email</b>. You may delete the PM
    Person email and the migration will generate a random one automatically.');
  }
  if ($pmp['linked_id'] != NULL and $du['linked_id'] == $pmp['id'] and $du['mail'] != $pmp['mail']) {
    $message = t('PM Person account and Drupal user account are linked,
    but their email doesn\'t match. Please edit PM Person email to <b>match</b>
    Drupal user email');
  }
  return $message;
}