Code Duplication    Length = 10-11 lines in 2 locations

settings/Controller/UsersController.php 2 locations

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