|
@@ -720,15 +720,19 @@ class SiteController extends ActionController
|
|
|
"'/user_upload/" . $organizationId . "/Forms'",
|
|
"'/user_upload/" . $organizationId . "/Forms'",
|
|
|
$hard);
|
|
$hard);
|
|
|
|
|
|
|
|
- $adminBeUserUid = $this->findAdminBeUserUid($rootUid);
|
|
|
|
|
- if ($adminBeUserUid !== null) {
|
|
|
|
|
- $this->delete('be_users', 'uid', $adminBeUserUid, $hard);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ $adminBeUserUid = $this->findAdminBeUserUid($rootUid);
|
|
|
|
|
+ if ($adminBeUserUid !== null) {
|
|
|
|
|
+ $this->delete('be_users', 'uid', $adminBeUserUid, $hard);
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (NoSuchRecordException $e) {}
|
|
|
|
|
|
|
|
- $editorsGroupUid = $this->findEditorsBeGroupUid($rootUid);
|
|
|
|
|
- if ($editorsGroupUid !== null) {
|
|
|
|
|
- $this->delete('be_groups', 'uid', $editorsGroupUid, $hard);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ $editorsGroupUid = $this->findEditorsBeGroupUid($rootUid);
|
|
|
|
|
+ if ($editorsGroupUid !== null) {
|
|
|
|
|
+ $this->delete('be_groups', 'uid', $editorsGroupUid, $hard);
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (NoSuchRecordException $e) {}
|
|
|
|
|
|
|
|
// Look up for the config.yaml file of the website
|
|
// Look up for the config.yaml file of the website
|
|
|
$configMainDir = $_ENV['TYPO3_PATH_APP'] . '/config/sites';
|
|
$configMainDir = $_ENV['TYPO3_PATH_APP'] . '/config/sites';
|
|
@@ -949,32 +953,30 @@ class SiteController extends ActionController
|
|
|
->where($queryBuilder->expr()->eq('path', "'/user_upload/" . $organizationId . "/Forms'"))
|
|
->where($queryBuilder->expr()->eq('path', "'/user_upload/" . $organizationId . "/Forms'"))
|
|
|
->execute();
|
|
->execute();
|
|
|
|
|
|
|
|
- $queryBuilder = $this->connectionPool->getQueryBuilderForTable('be_users');
|
|
|
|
|
- $queryBuilder
|
|
|
|
|
- ->update('be_users')
|
|
|
|
|
- ->set('deleted', 0)
|
|
|
|
|
- ->where($queryBuilder->expr()->eq('db_mountpoints', $rootUid))
|
|
|
|
|
- ->execute();
|
|
|
|
|
|
|
|
|
|
- $editorsGroupUid = $this->findEditorsBeGroupUid($rootUid, false);
|
|
|
|
|
- if ($editorsGroupUid !== null) {
|
|
|
|
|
- $queryBuilder = $this->connectionPool->getQueryBuilderForTable('be_groups');
|
|
|
|
|
- $queryBuilder
|
|
|
|
|
- ->update('be_groups')
|
|
|
|
|
- ->set('deleted', 0)
|
|
|
|
|
- ->where($queryBuilder->expr()->eq('uid', $editorsGroupUid))
|
|
|
|
|
- ->execute();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ $editorsGroupUid = $this->findEditorsBeGroupUid($rootUid, false);
|
|
|
|
|
+ if ($editorsGroupUid !== null) {
|
|
|
|
|
+ $queryBuilder = $this->connectionPool->getQueryBuilderForTable('be_groups');
|
|
|
|
|
+ $queryBuilder
|
|
|
|
|
+ ->update('be_groups')
|
|
|
|
|
+ ->set('deleted', 0)
|
|
|
|
|
+ ->where($queryBuilder->expr()->eq('uid', $editorsGroupUid))
|
|
|
|
|
+ ->execute();
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (NoSuchRecordException $e) {}
|
|
|
|
|
|
|
|
- $adminBeUserUid = $this->findAdminBeUserUid($rootUid, false);
|
|
|
|
|
- if ($adminBeUserUid !== null) {
|
|
|
|
|
- $queryBuilder = $this->connectionPool->getQueryBuilderForTable('be_users');
|
|
|
|
|
- $queryBuilder
|
|
|
|
|
- ->update('be_users')
|
|
|
|
|
- ->set('deleted', 0)
|
|
|
|
|
- ->where($queryBuilder->expr()->eq('uid', $adminBeUserUid))
|
|
|
|
|
- ->execute();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ $adminBeUserUid = $this->findAdminBeUserUid($rootUid, false);
|
|
|
|
|
+ if ($adminBeUserUid !== null) {
|
|
|
|
|
+ $queryBuilder = $this->connectionPool->getQueryBuilderForTable('be_users');
|
|
|
|
|
+ $queryBuilder
|
|
|
|
|
+ ->update('be_users')
|
|
|
|
|
+ ->set('deleted', 0)
|
|
|
|
|
+ ->where($queryBuilder->expr()->eq('uid', $adminBeUserUid))
|
|
|
|
|
+ ->execute();
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (NoSuchRecordException $e) {}
|
|
|
|
|
|
|
|
// Look up for the config.yaml file of the website
|
|
// Look up for the config.yaml file of the website
|
|
|
$configMainDir = $_ENV['TYPO3_PATH_APP'] . '/config/sites';
|
|
$configMainDir = $_ENV['TYPO3_PATH_APP'] . '/config/sites';
|
|
@@ -2343,7 +2345,7 @@ class SiteController extends ActionController
|
|
|
|
|
|
|
|
if ($row['uid']) {
|
|
if ($row['uid']) {
|
|
|
if ((string)$rootUid != (string)$row['db_mountpoints']) {
|
|
if ((string)$rootUid != (string)$row['db_mountpoints']) {
|
|
|
- throw new \RuntimeException("The be_user named '" . $expectedUsername . "' has unexpected mounted website(s)");
|
|
|
|
|
|
|
+ throw new \RuntimeException("The be_user named '" . $expectedUsername . "' has unexpected mounted website(s). Abort.");
|
|
|
}
|
|
}
|
|
|
$adminUid = $row['uid'];
|
|
$adminUid = $row['uid'];
|
|
|
}
|
|
}
|