/** @inheritdoc */
 public function cleanUser($user)
 {
     global $ACT;
     // the usermanager plugin
     if ($ACT == "admin" && $_REQUEST['page'] == "usermanager") {
         /** @var DokuWiki_Auth_Plugin $plugin */
         foreach ($this->plugins as $plugin) {
             $userdata = $plugin->getUserData($user);
             if (!empty($userdata)) {
                 return $plugin->cleanUser($user);
             }
         }
     } else {
         if (!empty($this->currentPlugin)) {
             return $this->currentPlugin->cleanUser($user);
         }
     }
     // in any other case ...
     return parent::cleanUser($user);
 }
예제 #2
0
파일: auth.php 프로젝트: ofsole/dokuwiki
 /**
  * Sanitize a given username [OPTIONAL]
  * Forwards the result of the auth plugin of the logged in user or 
  * returns false
  *
  *
  * @author Philipp Neuser <*****@*****.**>
  * @author Christian Marg <*****@*****.**>
  * @param  string $user username
  * @return string the cleaned username
  */
 public function cleanUser($user)
 {
     global $ACT;
     //print_r($this->chained_auth);
     if ($ACT == "admin" && $_REQUEST['page'] == "usermanager") {
         if (!is_null($this->usermanager_auth)) {
             return $this->usermanager_auth->cleanUser($user);
         }
     } else {
         if (!is_null($this->chained_auth)) {
             return $this->chained_auth->cleanUser($user);
         }
     }
     return parent::cleanUser($user);
 }