[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/inc/Action/ -> Profile.php (source)

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