Code Duplication    Length = 10-11 lines in 2 locations

settings/Controller/UsersController.php 2 locations

@@ 539-548 (lines=10) @@
536
		$userId = $this->userSession->getUser()->getUID();
537
		$user = $this->userManager->get($id);
538
539
		if ($userId === $id) {
540
			return new DataResponse(
541
				[
542
					'status' => 'error',
543
					'data' => [
544
						'message' => $errorMsgGeneral
545
					]
546
				], Http::STATUS_FORBIDDEN
547
			);
548
		}
549
550
		if($user) {
551
			if (!$this->isAdmin && !$this->groupManager->getSubAdmin()->isUserAccessible($this->userSession->getUser(), $user)) {
@@ 573-583 (lines=11) @@
570
					]
571
				]
572
			);
573
		} else {
574
			return new DataResponse(
575
				[
576
					'status' => 'error',
577
					'data' => [
578
						'message' => $errorMsgGeneral
579
					]
580
				],
581
				Http::STATUS_FORBIDDEN
582
			);
583
		}
584
585
	}
586