[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/inc/Action/ -> AbstractUserAction.php (source)

   1  <?php
   2  
   3  namespace dokuwiki\Action;
   4  
   5  use dokuwiki\Action\Exception\ActionUserRequiredException;
   6  
   7  /**
   8   * Class AbstractUserAction
   9   *
  10   * An action that requires a logged in user
  11   *
  12   * @package dokuwiki\Action
  13   */
  14  abstract class AbstractUserAction extends AbstractAclAction
  15  {
  16      /** @inheritdoc */
  17      public function checkPreconditions()
  18      {
  19          parent::checkPreconditions();
  20          global $INPUT;
  21          if ($INPUT->server->str('REMOTE_USER') === '') {
  22              throw new ActionUserRequiredException();
  23          }
  24      }
  25  }