diff --git a/apps/files_trashbin/lib/Trashbin.php b/apps/files_trashbin/lib/Trashbin.php index dbe5cb65e19ed..fa5aa443b23c6 100644 --- a/apps/files_trashbin/lib/Trashbin.php +++ b/apps/files_trashbin/lib/Trashbin.php @@ -80,7 +80,7 @@ public static function getUidAndFilename($filename) { // to a remote user with a federated cloud ID we use the current logged-in // user. We need a valid local user to move the file to the right trash bin if (!$userManager->userExists($uid)) { - $uid = $userSession->getUser(); + $uid = $userSession->getUser()->getUID(); } if (!$uid) { // no owner, usually because of share link from ext storage