/**
  * @see Page::show()
  */
 public function show()
 {
     // set active menu item
     UserProfileMenu::getInstance()->setActiveMenuItem('wcf.user.profile.menu.link.infraction');
     // check permission
     if (!USER_CAN_SEE_HIS_WARNINGS || WCF::getUser()->userID != $this->frame->getUserID()) {
         WCF::getUser()->checkPermission('admin.user.infraction.canWarnUser');
     }
     parent::show();
 }
 /**
  * @see Page::show()
  */
 public function show()
 {
     // set active menu item
     UserProfileMenu::getInstance()->setActiveMenuItem('wcf.user.profile.menu.link.profile');
     // update profile hits
     if ($this->frame->getUserID() != WCF::getUser()->userID && !WCF::getSession()->spiderID) {
         $sql = "UPDATE\twcf" . WCF_N . "_user\n\t\t\t\tSET\tprofileHits = profileHits + 1\n\t\t\t\tWHERE\tuserID = " . $this->frame->getUserID();
         WCF::getDB()->registerShutdownUpdate($sql);
         // save visitor
         if (WCF::getUser()->userID && !WCF::getUser()->invisible) {
             $sql = "INSERT INTO\t\t\twcf" . WCF_N . "_user_profile_visitor\n\t\t\t\t\t\t\t\t\t(ownerID, userID, time)\n\t\t\t\t\tVALUES\t\t\t\t(" . $this->frame->getUserID() . ", " . WCF::getUser()->userID . ", " . TIME_NOW . ")\n\t\t\t\t\tON DUPLICATE KEY UPDATE\t\ttime = VALUES(time)";
             WCF::getDB()->registerShutdownUpdate($sql);
         }
     }
     parent::show();
 }
 public function verifyPermissions()
 {
     try {
         if (!$this->userPermissions['canUseGuestbook']) {
             throw new NamedUserException(WCF::getLanguage()->get('wcf.user.profile.error.guestbook.permissionDenied'));
         }
         if (!$this->frame->getUser()->getPermission('user.guestbook.canUseGuestbook')) {
             throw new NamedUserException(WCF::getLanguage()->getDynamicVariable('wcf.user.profile.error.guestbook.notActivated', array('username' => $this->frame->getUser()->username)));
         }
         if (!$this->userPermissions['canViewGuestbook']) {
             throw new NamedUserException(WCF::getLanguage()->getDynamicVariable('wcf.user.profile.error.guestbook.protected', array('username' => $this->frame->getUser()->username)));
         }
     } catch (NamedUserException $e) {
         $this->frame->assignVariables();
         WCF::getTPL()->assign('errorMessage', $e->getMessage());
         WCF::getTPL()->display('userProfileAccessDenied');
         exit;
     }
 }
 /**
  * @see Page::assignVariables()
  */
 public function assignVariables()
 {
     parent::assignVariables();
     $this->frame->assignVariables();
 }
 /**
  * @see	Page::assignVariables()
  */
 public function assignVariables()
 {
     parent::assignVariables();
     $this->frame->assignVariables();
     WCF::getTPL()->assign(array('action' => $this->action));
 }