X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FUserImport.php;h=71767e8cef788be4cfa1f90b7c189d7dac63ad13;hb=f70271aa5d40ce48ec92f1c6ec652c6a977e588c;hp=0a4223fecdf5f45241051631dcb23a0c5d10aab2;hpb=55325f191bd90a70dd31b066a47c3c2044981278;p=friendica.git diff --git a/src/Core/UserImport.php b/src/Core/UserImport.php index 0a4223fecd..71767e8cef 100644 --- a/src/Core/UserImport.php +++ b/src/Core/UserImport.php @@ -10,6 +10,7 @@ use Friendica\Database\DBStructure; use Friendica\Model\Photo; use Friendica\Object\Image; use Friendica\Util\Strings; +use Friendica\Worker\Delivery; /** * @brief UserImport class @@ -39,14 +40,21 @@ class UserImport $tableColumns = DBStructure::getColumns($table); $tcols = []; + $ttype = []; // get a plain array of column names foreach ($tableColumns as $tcol) { $tcols[] = $tcol['Field']; + $ttype[$tcol['Field']] = $tcol['Type']; } // remove inexistent columns foreach ($arr as $icol => $ival) { if (!in_array($icol, $tcols)) { unset($arr[$icol]); + continue; + } + + if ($ttype[$icol] === 'datetime') { + $arr[$icol] = $ival ?? DBA::NULL_DATETIME; } } } @@ -271,7 +279,7 @@ class UserImport } // send relocate messages - Worker::add(PRIORITY_HIGH, 'Notifier', 'relocate', $newuid); + Worker::add(PRIORITY_HIGH, 'Notifier', Delivery::RELOCATION, $newuid); info(L10n::t("Done. You can now login with your username and password")); $a->internalRedirect('login');