1<?php 2 3namespace dokuwiki\Menu\Item; 4 5use dokuwiki\File\StaticImage; 6 7/** 8 * Class Profile 9 * 10 * Open the user's profile 11 */ 12class Profile 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("profile is only for logged in users"); 22 } 23 24 $this->svg = StaticImage::path('menu/account-card-details.svg'); 25 } 26} 27