You are here

function _drush_migrate_notify in Migrate 7.2

Send email notification to the user running the operation.

2 calls to _drush_migrate_notify()
drush_migrate_import in ./migrate.drush.inc
Perform import on one or more migrations.
drush_migrate_rollback in ./migrate.drush.inc
Roll back one specified migration

File

./migrate.drush.inc, line 976
Drush support for the migrate module

Code

function _drush_migrate_notify() {
  global $user;
  if ($user->uid) {
    $uid = $user->uid;
  }
  else {
    $uid = 1;
  }
  $account = user_load($uid);
  $params['account'] = $account;
  $params['output'] = ob_get_contents();
  drush_print_r(ob_get_status());
  ob_end_flush();
  drupal_mail('migrate_ui', 'import_complete', $account->mail, user_preferred_language($account), $params);
}