Code Duplication    Length = 3-3 lines in 2 locations

apps/provisioning_api/lib/Controller/UsersController.php 2 locations

@@ 370-372 (lines=3) @@
367
368
		// If not permitted
369
		$subAdminManager = $this->groupManager->getSubAdmin();
370
		if(!$this->groupManager->isAdmin($currentLoggedInUser->getUID()) && !$subAdminManager->isUserAccessible($currentLoggedInUser, $targetUser)) {
371
			throw new OCSException('', \OCP\API::RESPOND_UNAUTHORISED);
372
		}
373
374
		// Go ahead with the delete
375
		if($targetUser->delete()) {
@@ 425-427 (lines=3) @@
422
423
		// If not permitted
424
		$subAdminManager = $this->groupManager->getSubAdmin();
425
		if(!$this->groupManager->isAdmin($currentLoggedInUser->getUID()) && !$subAdminManager->isUserAccessible($currentLoggedInUser, $targetUser)) {
426
			throw new OCSException('', \OCP\API::RESPOND_UNAUTHORISED);
427
		}
428
429
		// enable/disable the user now
430
		$targetUser->setEnabled($value);