1<?php 2 3namespace dokuwiki\Action; 4 5use 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 */ 14abstract class AbstractUserAction extends AbstractAclAction 15{ 16 17 /** @inheritdoc */ 18 public function checkPreconditions() 19 { 20 parent::checkPreconditions(); 21 global $INPUT; 22 if($INPUT->server->str('REMOTE_USER') === '') { 23 throw new ActionUserRequiredException(); 24 } 25 } 26} 27