aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorprovokateurin <kate@provokateurin.de>2024-10-08 11:12:01 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-10-17 17:59:20 +0200
commitc42ec8d0d26276afd214e5891a422c4c11e493aa (patch)
tree8f7ea4f442d183ac0c7b85242b84ce110c0e0372
parent1b76925aed75d94481c1230c6c32b7f7ff57e18e (diff)
downloadnextcloud-server-c42ec8d0d26276afd214e5891a422c4c11e493aa.tar.gz
nextcloud-server-c42ec8d0d26276afd214e5891a422c4c11e493aa.zip
fix(UserTrait): Fix backend initializationbackport/47896/stable28
Signed-off-by: provokateurin <kate@provokateurin.de>
-rw-r--r--lib/private/Authentication/Listeners/UserDeletedFilesCleanupListener.php1
-rw-r--r--tests/lib/Traits/UserTrait.php3
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Authentication/Listeners/UserDeletedFilesCleanupListener.php b/lib/private/Authentication/Listeners/UserDeletedFilesCleanupListener.php
index 888ac30d321..bd639a3a37c 100644
--- a/lib/private/Authentication/Listeners/UserDeletedFilesCleanupListener.php
+++ b/lib/private/Authentication/Listeners/UserDeletedFilesCleanupListener.php
@@ -35,6 +35,7 @@ use OCP\User\Events\BeforeUserDeletedEvent;
use OCP\User\Events\UserDeletedEvent;
use Psr\Log\LoggerInterface;
+/** @template-implements IEventListener<BeforeUserDeletedEvent|UserDeletedEvent> */
class UserDeletedFilesCleanupListener implements IEventListener {
/** @var array<string,IStorage> */
private $homeStorageCache = [];
diff --git a/tests/lib/Traits/UserTrait.php b/tests/lib/Traits/UserTrait.php
index 3f7cfe419db..d2c1444c943 100644
--- a/tests/lib/Traits/UserTrait.php
+++ b/tests/lib/Traits/UserTrait.php
@@ -9,13 +9,16 @@
namespace Test\Traits;
use OC\User\User;
+use OCP\EventDispatcher\IEventDispatcher;
use OCP\IUser;
+use OCP\Server;
class DummyUser extends User {
private string $uid;
public function __construct(string $uid) {
$this->uid = $uid;
+ parent::__construct($uid, null, Server::get(IEventDispatcher::class));
}
public function getUID(): string {