Skip to content
Snippets Groups Projects
Commit 1969c8d5 authored by Robin Appelman's avatar Robin Appelman
Browse files

save uid instead of user object in command

parent 8c903c10
No related branches found
No related tags found
No related merge requests found
...@@ -32,17 +32,17 @@ class Expire implements ICommand { ...@@ -32,17 +32,17 @@ class Expire implements ICommand {
private $neededSpace = 0; private $neededSpace = 0;
/** /**
* @var int * @var string
*/ */
private $user; private $user;
/** /**
* @param IUser $user * @param string $user
* @param string $fileName * @param string $fileName
* @param int|null $versionsSize * @param int|null $versionsSize
* @param int $neededSpace * @param int $neededSpace
*/ */
function __construct(IUser $user, $fileName, $versionsSize = null, $neededSpace = 0) { function __construct($user, $fileName, $versionsSize = null, $neededSpace = 0) {
$this->user = $user; $this->user = $user;
$this->fileName = $fileName; $this->fileName = $fileName;
$this->versionsSize = $versionsSize; $this->versionsSize = $versionsSize;
...@@ -51,7 +51,7 @@ class Expire implements ICommand { ...@@ -51,7 +51,7 @@ class Expire implements ICommand {
public function handle() { public function handle() {
$this->setupFS($this->user); \OC_Util::setupFS($this->user);
Storage::expire($this->fileName, $this->versionsSize, $this->neededSpace); Storage::expire($this->fileName, $this->versionsSize, $this->neededSpace);
} }
} }
...@@ -483,7 +483,7 @@ class Storage { ...@@ -483,7 +483,7 @@ class Storage {
* @param int $neededSpace * @param int $neededSpace
*/ */
private static function scheduleExpire($fileName, $versionsSize = null, $neededSpace = 0) { private static function scheduleExpire($fileName, $versionsSize = null, $neededSpace = 0) {
$command = new Expire(\OC::$server->getUserSession()->getUser(), $fileName, $versionsSize, $neededSpace); $command = new Expire(\OC::$server->getUserSession()->getUser()->getUID(), $fileName, $versionsSize, $neededSpace);
\OC::$server->getCommandBus()->push($command); \OC::$server->getCommandBus()->push($command);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment