AbstractUserAction.php 527 B

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