Make user id from occ command available in the service
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -88,13 +88,8 @@ class UserExport extends Command {
|
||||
|
||||
$userId = $input->getArgument('user-id');
|
||||
|
||||
$groups = $this->groupManager->getUserGroupIds(
|
||||
$this->userManager->get($userId)
|
||||
);
|
||||
$boards = $this->boardService->findAll([
|
||||
'user' => $userId,
|
||||
'groups' => $groups
|
||||
]);
|
||||
$this->boardService->setUserId($userId);
|
||||
$boards = $this->boardService->findAll();
|
||||
|
||||
$data = [];
|
||||
foreach ($boards as $board) {
|
||||
|
||||
@@ -98,6 +98,15 @@ class BoardService {
|
||||
$this->userId = $userId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a different user than the current one, e.g. when no user is available in occ
|
||||
*
|
||||
* @param string $userId
|
||||
*/
|
||||
public function setUserId(string $userId): void {
|
||||
$this->userId = $userId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user