Beispiel #1
0
 function UpdateSessionSaleUserID()
 {
     global $USER;
     if ((string) $_SESSION["SALE_USER_ID"] !== "" && intval($_SESSION["SALE_USER_ID"]) . "|" != $_SESSION["SALE_USER_ID"] . "|") {
         $arRes = CSaleUser::GetList(array("CODE" => $_SESSION["SALE_USER_ID"]));
         if (!empty($arRes)) {
             $_SESSION["SALE_USER_ID"] = $arRes['ID'];
             return $arRes['ID'];
         } else {
             if ($USER && $USER->IsAuthorized()) {
                 $ID = CSaleUser::getFUserCode();
                 return $ID;
             }
         }
     }
 }
Beispiel #2
0
 /**
  * Return fuser code.
  *
  * @return int
  */
 protected static function getCode()
 {
     return \CSaleUser::getFUserCode();
 }