[ Index ] |
PHP Cross Reference of DokuWiki |
[Summary view] [Print] [Text view]
1 <?php 2 3 namespace dokuwiki\Action; 4 5 use dokuwiki\Ui\UserProfile; 6 use dokuwiki\Action\Exception\ActionAbort; 7 use dokuwiki\Action\Exception\ActionDisabledException; 8 use dokuwiki\Extension\AuthPlugin; 9 use dokuwiki\Ui; 10 11 /** 12 * Class Profile 13 * 14 * Handle the profile form 15 * 16 * @package dokuwiki\Action 17 */ 18 class Profile extends AbstractUserAction 19 { 20 /** @inheritdoc */ 21 public function minimumPermission() 22 { 23 return AUTH_NONE; 24 } 25 26 /** @inheritdoc */ 27 public function checkPreconditions() 28 { 29 parent::checkPreconditions(); 30 31 /** @var AuthPlugin $auth */ 32 global $auth; 33 if (!$auth->canDo('Profile')) throw new ActionDisabledException(); 34 } 35 36 /** @inheritdoc */ 37 public function preProcess() 38 { 39 global $lang; 40 if (updateprofile()) { 41 msg($lang['profchanged'], 1); 42 throw new ActionAbort('show'); 43 } 44 } 45 46 /** @inheritdoc */ 47 public function tplContent() 48 { 49 (new UserProfile())->show(); 50 } 51 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body