Skip to content

Commit

Permalink
#4058 - Password expiration options (studio)
Browse files Browse the repository at this point in the history
  • Loading branch information
romanlesnikov committed Sep 21, 2022
1 parent aee916b commit bfb515d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions inc/classes/BxDolAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,7 @@ public function addInformerPermanentMessages ($oInformer)
$oInformer->add('sys-account-unconfirmed-phone', _t('_sys_txt_account_unconfirmed_phone', $sUrl), BX_INFORMER_ALERT);
}
}
$this->isNeedChangePassword();
}

/**
Expand Down Expand Up @@ -759,6 +760,9 @@ public function isNeedChangePassword($iAccountId = false)
if (isset($aPageParams['i']) && $aPageParams['i'] == 'account-settings-password')
$bNeedRedirectToChangePassword = false;


bx_alert('account', 'is_need_to_change_password', $iAccountId, false, array('override_result' => &$bNeedRedirectToChangePassword));

if ($aAccountInfo['password_expired'] >0 && $aAccountInfo['password_expired'] < time() && $bNeedRedirectToChangePassword){
if (getParam('sys_account_accounts_force_password_change_after_expiration') == 'on'){
header('Location: ' . BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=account-settings-password'));
Expand Down
11 changes: 9 additions & 2 deletions studio/template/css/launcher.css
Original file line number Diff line number Diff line change
Expand Up @@ -395,5 +395,12 @@ div.bx-std-widget-caption a {
display: none;
}



#bx-informer{
position: fixed;
bottom: 0px;
width: calc(100% - 2.5rem);
left: 0px
}
#bx-informer .bx-informer-msg{
background-color: rgba(255, 234, 193, 1);
}
2 changes: 2 additions & 0 deletions studio/template/scripts/BxBaseStudioLauncher.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ public function getPageCode($sPage = '', $bWrap = true)
if (getParam('site_tour_studio') == 'on')
$sResult .= $oTemplate->parseHtmlByName('launcher_tour.html', array());

$sResult .= BxDolInformer::getInstance($oTemplate)->display();

$oTemplate->addInjection('injection_body_style', 'text', ' bx-std-page-launcher');
return $sResult;
}
Expand Down

0 comments on commit bfb515d

Please sign in to comment.