1<?php 2 3namespace dokuwiki\Menu\Item; 4 5use dokuwiki\File\StaticImage; 6 7/** 8 * Class Register 9 * 10 * Open the view to register a new account 11 */ 12class Register extends AbstractItem 13{ 14 /** @inheritdoc */ 15 public function __construct() 16 { 17 global $INPUT; 18 parent::__construct(); 19 20 if ($INPUT->server->str('REMOTE_USER')) { 21 throw new \RuntimeException("no register when already logged in"); 22 } 23 24 $this->svg = StaticImage::path('menu/account-plus.svg'); 25 } 26} 27