Skip to content

Commit

Permalink
Fixed issue with admin logout when SSO is enabled
Browse files Browse the repository at this point in the history
SUDHANSHU authored and SUDHANSHU committed Jun 19, 2018
1 parent 778cf1f commit 7a2ae55
Showing 7 changed files with 9 additions and 8 deletions.
Binary file modified drupal-8/package/customer_identity_and_access_management.zip
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -28,6 +28,9 @@ further information.

-- CHANGE LOG --

-- 8.x-3.12 --
* Bug Fixed: Admin logout when SSO is enabled.

-- 8.x-3.11 --
* Fixed SSO logout related bug on iOS.

Original file line number Diff line number Diff line change
@@ -3,6 +3,6 @@ type: module
description: 'Allow users to sign up through a registration form. User Registration offers fully customized options for collecting and updating user data.'
package: CIAM LoginRadius
configure: lr_ciam.settings_form
version: '8.x-3.11'
version: '8.x-3.12'
core: '8.x'
project: 'customer_identity_and_access_management'
Original file line number Diff line number Diff line change
@@ -5,6 +5,6 @@ package: CIAM LoginRadius
dependencies:
- lr_ciam
configure: lr_hostedpage.settings_form
version: '8.x-3.11'
version: '8.x-3.12'
core: '8.x'
project: 'customer_identity_and_access_management'
Original file line number Diff line number Diff line change
@@ -5,6 +5,6 @@ package: CIAM LoginRadius
dependencies:
- drupal:lr_ciam
- drupal:simple_oauth
version: '8.x-3.11'
version: '8.x-3.12'
core: '8.x'
project: 'customer_identity_and_access_management'
Original file line number Diff line number Diff line change
@@ -5,6 +5,6 @@ package: CIAM LoginRadius
dependencies:
- lr_ciam
configure: lr_sso.settings_form
version: '8.x-3.11'
version: '8.x-3.12'
core: '8.x'
project: 'customer_identity_and_access_management'
Original file line number Diff line number Diff line change
@@ -11,21 +11,19 @@ use Drupal\Core\Form\FormStateInterface;
* @param $hook
*/
function lr_sso_page_attachments(&$page) {
global $user;
$sso_config = \Drupal::config('lr_sso.settings');
$sl_config = \Drupal::config('lr_ciam.settings');
$site_name = $sl_config->get('sso_site_name');

if ($sso_config->get('sso_enable') == 1 && !empty($site_name)) {
$user = \Drupal::currentUser()->getRoles();
$my_settings['frontUrl'] = Url::fromRoute('<front>')->setAbsolute()->toString();

if ( \Drupal::currentUser()->isAnonymous()) {
if ( \Drupal::currentUser()->isAnonymous()) {

$my_settings['isNotLogin'] = true;
$my_settings['loginUrl'] = Url::fromRoute('user.login')->setAbsolute()->toString();
}
if ( !\Drupal::currentUser()->isAnonymous() && !in_array("administrator", $user)) {
if ( !\Drupal::currentUser()->isAnonymous()) {

$my_settings['isNotLoginThenLogout'] = true;
$my_settings['logoutUrl'] = Url::fromRoute('user.logout')->setAbsolute()->toString();

0 comments on commit 7a2ae55

Please sign in to comment.