Index: branches/5.1.x/core/kernel/db/db_event_handler.php =================================================================== diff -u -r13569 -r13581 --- branches/5.1.x/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 13569) +++ branches/5.1.x/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 13581) @@ -1,6 +1,6 @@ Application->RecallVar('user_id'); $event->setEventParam('top_prefix', $this->Application->GetTopmostPrefix($event->Prefix, true)); $status_checked = false; - if ($user_id == -1 || $this->CheckPermission($event)) { + if ($user_id == USER_ROOT || $this->CheckPermission($event)) { // don't autoload item, when user doesn't have view permission $this->LoadItem($event); $status_checked = true; $editing_mode = defined('EDITING_MODE') ? EDITING_MODE : false; - if ($user_id != -1 && !$this->Application->isAdmin && !($editing_mode || $this->checkItemStatus($event))) { + if ($user_id != USER_ROOT && !$this->Application->isAdmin && !($editing_mode || $this->checkItemStatus($event))) { // non-root user AND on front-end AND (not editing mode || incorrect status) $perm_status = false; } @@ -2647,7 +2647,7 @@ $admin_ses =& $this->Application->recallObject('Session.admin'); /* @var $admin_ses Session */ - if ($admin_ses->RecallVar('user_id') == -1) { + if ($admin_ses->RecallVar('user_id') == USER_ROOT) { return true; }