Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
Change background image
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKampf committed Jul 20, 2023
1 parent af3c7c8 commit 397fb90
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions nextmagentacloud21/core/js/customutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -616,18 +616,22 @@ function leftSidebarEvents() {
window.addEventListener("consentChanged", ()=> redirectToTelekomLogin());

//If the page is loaded with consent given, redirect to Telekom Login
window.onload = function () {
var urlParams = new URLSearchParams(window.location.search);
if( "object" === typeof utag &&
"object" === typeof utag.gdpr &&
utag.gdpr.getConsentState() !== 0 &&
//Check is direct login is not set to 2
(!urlParams.has('direct') && urlParams.get('direct') !== '2')) {
//Redirect to Telekom Login
redirectToTelekomLogin();
if(document.getElementById("alternative-logins")){
window.onload = function () {
var urlParams = new URLSearchParams(window.location.search);
if( "object" === typeof utag &&
"object" === typeof utag.gdpr &&
utag.gdpr.getConsentState() !== 0 &&
//Check is direct login is not set to 2
(!urlParams.has('direct') && urlParams.get('direct') !== '2')) {
//Redirect to Telekom Login
redirectToTelekomLogin();
}
}
}



function redirectToTelekomLogin(){
//Path to Telekom Login
window.location.href = "/apps/user_oidc/login/1";
Expand Down

0 comments on commit 397fb90

Please sign in to comment.