Code Duplication    Length = 10-11 lines in 2 locations

settings/Controller/UsersController.php 2 locations

@@ 556-565 (lines=10) @@
553
		$userId = $this->userSession->getUser()->getUID();
554
		$user = $this->userManager->get($id);
555
556
		if ($userId === $id) {
557
			return new DataResponse(
558
				[
559
					'status' => 'error',
560
					'data' => [
561
						'message' => $errorMsgGeneral
562
					]
563
				], Http::STATUS_FORBIDDEN
564
			);
565
		}
566
567
		if ($user) {
568
			if (!$this->isAdmin && !$this->groupManager->getSubAdmin()->isUserAccessible($this->userSession->getUser(), $user)) {
@@ 590-600 (lines=11) @@
587
					]
588
				]
589
			);
590
		} else {
591
			return new DataResponse(
592
				[
593
					'status' => 'error',
594
					'data' => [
595
						'message' => $errorMsgGeneral
596
					]
597
				],
598
				Http::STATUS_FORBIDDEN
599
			);
600
		}
601
602
	}
603