Skip to content

Commit

Permalink
Bug fixe with logout and add current provider method
Browse files Browse the repository at this point in the history
  • Loading branch information
kalypso63 committed Sep 29, 2017
1 parent 638e8a4 commit 1bc6baa
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
7 changes: 3 additions & 4 deletions Classes/Hooks/LogOffHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

class LogOffHook
{

/**
* Object manager
*
Expand All @@ -42,12 +41,12 @@ class LogOffHook
*/
public function postProcessing($params, $pObj)
{
if ($pObj->loginType !== 'FE') {
return;
}
$this->objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
/** @var \MV\SocialAuth\Utility\AuthUtility $authUtility */
$authUtility = $this->objectManager->get(\MV\SocialAuth\Utility\AuthUtility::class);
$authUtility->logout();
session_start();
session_destroy();
$pObj->removeCookie('PHPSESSID');
}
}
9 changes: 9 additions & 0 deletions Classes/Service/SocialAuthenticationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,15 @@ protected function isServiceAvailable()
return (boolean) $this->extConfig['providers.'][strtolower($this->provider) . '.']['enabled'];
}

/**
* Returns current provider
*
* @return string
*/
public function getCurrentProvider()
{
return $this->provider;
}

/**
* @param $identifier
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"homepage": "http://typo3.org",
"license": ["GPL-2.0+"],
"version": "1.1.7",
"version": "1.1.8",
"require": {
"hybridauth/hybridauth": "~2.9.0"
},
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
'uploadfolder' => 0,
'createDirs' => '',
'clearCacheOnLoad' => 0,
'version' => '1.1.7',
'version' => '1.1.8',
'constraints' => array(
'depends' => array(
'typo3' => '6.2.0-8.7.99'
Expand Down

0 comments on commit 1bc6baa

Please sign in to comment.