mirror of
https://github.com/friendica/friendica
synced 2025-04-29 06:24:23 +02:00
friendica-6950 uimport doesn't support "pwdreset_time":null
This commit is contained in:
parent
ea218438d2
commit
220f8f0862
2 changed files with 40 additions and 2 deletions
|
@ -39,14 +39,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] = !empty($ival) ? $ival : DBA::NULL_DATETIME;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue