Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion lib/private/User/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,16 @@ public function createUserFromBackend($uid, $password, UserInterface $backend):
if ($state === false) {
throw new \InvalidArgumentException($l->t('Could not create account'));
}
$user = $this->getUserObject($uid, $backend);
try {
$user = $this->getUserObject($uid, $backend);
} catch (\RuntimeException $e) {
$this->logger->error('Failed to get user after creation', [
'exception' => $e,
'uid' => $uid,
'exists_backend' => $backend->userExists($uid),
]);
throw new \RuntimeException('Failed to get user after creation', previous: $e);
}
if ($user instanceof IUser) {
/** @deprecated 21.0.0 use UserCreatedEvent event with the IEventDispatcher instead */
$this->emit('\OC\User', 'postCreateUser', [$user, $password]);
Expand Down
Loading