Skip to content
Snippets Groups Projects
Commit 33e00a67 authored by Tobias Adolph's avatar Tobias Adolph Committed by Benni Mack
Browse files

[TASK] Doctrine: Migrate OpenidExtractionUpdate

Resolves: #77593
Releases: master
Change-Id: I4e6b483b5022cf54223a8f0cfad789d1ba7315fd
Reviewed-on: https://review.typo3.org/49543


Tested-by: default avatarBamboo TYPO3com <info@typo3.com>
Reviewed-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarBenni Mack <benni@typo3.org>
parent fe1795b2
Branches
Tags
No related merge requests found
...@@ -14,6 +14,9 @@ namespace TYPO3\CMS\Install\Updates; ...@@ -14,6 +14,9 @@ namespace TYPO3\CMS\Install\Updates;
* The TYPO3 project - inspiring people to share! * The TYPO3 project - inspiring people to share!
*/ */
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/** /**
* Installs and downloads EXT:openid if needed * Installs and downloads EXT:openid if needed
*/ */
...@@ -53,12 +56,17 @@ class OpenidExtractionUpdate extends AbstractDownloadExtensionUpdate ...@@ -53,12 +56,17 @@ class OpenidExtractionUpdate extends AbstractDownloadExtensionUpdate
if (!$this->isWizardDone()) { if (!$this->isWizardDone()) {
$columnsExists = false; $columnsExists = false;
$columns = $this->getDatabaseConnection()->admin_get_fields('fe_users'); $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
if (isset($columns['tx_openid_openid'])) { $schemaManager = $connectionPool->getConnectionForTable('fe_users')->getSchemaManager();
if ($schemaManager->listTableDetails('fe_users')->hasColumn('tx_openid_openid')) {
$columnsExists = true; $columnsExists = true;
} }
$columns = $this->getDatabaseConnection()->admin_get_fields('be_users');
if (isset($columns['tx_openid_openid'])) { // Reinitialize schemaManager, since be_users could be on another connection
$schemaManager = $connectionPool->getConnectionForTable('be_users')->getSchemaManager();
if ($schemaManager->listTableDetails('be_users')->hasColumn('tx_openid_openid')) {
$columnsExists = true; $columnsExists = true;
} }
if ($columnsExists) { if ($columnsExists) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment