Skip to content

Commit

Permalink
Fix import + add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Dec 12, 2017
1 parent a4b5370 commit 0cea382
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions main/cron/import_csv.php
Expand Up @@ -2229,13 +2229,17 @@ public function importCare($file, $moveFile = false)
);

if (empty($userId)) {
if (empty($userInfo)) {
$this->logger->addInfo("User does '".$row['External_user_id']."' not exists skip this entry.");
continue;
}
$this->logger->addInfo("User does '".$row['External_user_id']."' not exists skip this entry.");
continue;
}

$userInfo = api_get_user_entity($userId);

if (empty($userInfo)) {
$this->logger->addInfo("Chamilo user does not found: #".$userId."' ");
continue;
}

// Dates
$createdAt = $this->createDateTime($row['Added_On']);
$updatedAt = $this->createDateTime($row['Edited_on']);
Expand Down

0 comments on commit 0cea382

Please sign in to comment.