コード例 #1
0
ファイル: oxcmp_user.php プロジェクト: ioanok/symfoxid
 /**
  * Special functionality which is performed after user logs in (or user is created without pass).
  * Performes additional checking if user is not BLOCKED (oxuser::InGroup("oxidblocked")) - if
  * yes - redirects to blocked user page ("cl=content&tpl=user_blocked.tpl").
  * Stores cookie info if user confirmed in login screen.
  * Then loads delivery info and forces basket to recalculate
  * (oxsession::getBasket() + oBasket::blCalcNeeded = true). Returns
  * "payment" to redirect to payment screen. If problems occured loading
  * user - sets error code according problem, and returns "user" to redirect
  * to user info screen.
  *
  * @param oxuser $oUser user object
  *
  * @return string
  */
 protected function _afterLogin($oUser)
 {
     $oSession = $this->getSession();
     // generating new session id after login
     if ($this->getLoginStatus() === USER_LOGIN_SUCCESS) {
         $oSession->regenerateSessionId();
     }
     $myConfig = $this->getConfig();
     // this user is blocked, deny him
     if ($oUser->inGroup('oxidblocked')) {
         $sUrl = $myConfig->getShopHomeURL() . 'cl=content&tpl=user_blocked.tpl';
         oxRegistry::getUtils()->redirect($sUrl, true, 302);
     }
     // recalc basket
     if ($oBasket = $oSession->getBasket()) {
         $oBasket->onUpdate();
     }
     return 'payment';
 }
コード例 #2
0
 /**
  * Special functionality which is performed after user logs in (or user is created without pass).
  * Performes additional checking if user is not BLOCKED (oxuser::InGroup("oxidblocked")) - if
  * yes - redirects to blocked user page ("cl=content&tpl=user_blocked.tpl"). If user status
  * is OK - sets user ID to session, automatically assigns him to dynamic
  * group (oxuser::addDynGroup(); if this directive is set (usually
  * by URL)). Stores cookie info if user confirmed in login screen.
  * Then loads delivery info and forces basket to recalculate
  * (oxsession::getBasket() + oBasket::blCalcNeeded = true). Returns
  * "payment" to redirect to payment screen. If problems occured loading
  * user - sets error code according problem, and returns "user" to redirect
  * to user info screen.
  *
  * @param oxuser $oUser user object
  *
  * @return string
  */
 protected function _afterLogin($oUser)
 {
     $oSession = $this->getSession();
     // generating new session id after login
     if ($this->getLoginStatus() === USER_LOGIN_SUCCESS) {
         $oSession->regenerateSessionId();
     }
     $myConfig = $this->getConfig();
     // this user is blocked, deny him
     if ($oUser->inGroup('oxidblocked')) {
         oxUtils::getInstance()->redirect($myConfig->getShopHomeURL() . 'cl=content&tpl=user_blocked.tpl', true, 302);
     }
     // adding to dyn group
     $oUser->addDynGroup(oxSession::getVar('dgr'), $myConfig->getConfigParam('aDeniedDynGroups'));
     // recalc basket
     if ($oBasket = $oSession->getBasket()) {
         $oBasket->onUpdate();
     }
     // #1678 R
     // @deprecated since 2012-03-14 in version 4.5.8. This parameter will not be used anymore
     if (!$myConfig->getConfigParam('blPerfNoBasketSaving')) {
         $myConfig->setGlobalParameter('blUserChanged', 1);
     }
     // @end deprecated
     return 'payment';
 }