MigrationMoodle: Throw exception when user is not created - refs BT#15992

pull/3127/head
Angel Fernando Quiroz Campos 6 years ago
parent a52b7dd5cf
commit 00812dc72d
  1. 4
      plugin/migrationmoodle/src/Loader/UsersLoader.php

@ -50,6 +50,10 @@ class UsersLoader implements LoaderInterface
[]
);
if (empty($userId)) {
throw new \Exception('Users not created');
}
/** @var User $user */
$user = api_get_user_entity($userId);
$user->setRegistrationDate($incomingData['registration_date']);

Loading…
Cancel
Save