Changeset View
Changeset View
Standalone View
Standalone View
modules/in-commerce/units/orders/orders_event_handler.php
Show First 20 Lines • Show All 1572 Lines • ▼ Show 20 Line(s) | |||||
/** | /** | ||||
* Set's order's user_id to user from session or Guest otherwise | * Set's order's user_id to user from session or Guest otherwise | ||||
* | * | ||||
* @param kEvent $event | * @param kEvent $event | ||||
*/ | */ | ||||
function CheckUser($event) | function CheckUser($event) | ||||
{ | { | ||||
if ($this->Application->isAdminUser || defined('GW_NOTIFY')) { | if ( $this->Application->isAdminUser || defined('GW_NOTIFY') || defined('CRON') ) { | ||||
// don't check for user in order while processing payment | // 1. don't check, when Administrator is editing the order. | ||||
// gateways, because they can do cross-domain ssl redirects | // 2. don't check while processing payment gateways, because they can do cross-domain ssl redirects. | ||||
// 3. don't check from CRON, because it's like Admin updates orders on other user behalf. | |||||
return; | return; | ||||
} | } | ||||
$order = $event->getObject(); | $order = $event->getObject(); | ||||
/* @var $order OrdersItem */ | /* @var $order OrdersItem */ | ||||
$ses_user = $this->Application->RecallVar('user_id'); | $ses_user = $this->Application->RecallVar('user_id'); | ||||
▲ Show 20 Lines • Show All 2449 Lines • Show Last 20 Lines |