diff options
Diffstat (limited to '_test/mock/AuthDeletePlugin.php')
-rw-r--r-- | _test/mock/AuthDeletePlugin.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/_test/mock/AuthDeletePlugin.php b/_test/mock/AuthDeletePlugin.php new file mode 100644 index 000000000..82e96f2a6 --- /dev/null +++ b/_test/mock/AuthDeletePlugin.php @@ -0,0 +1,28 @@ +<?php + +namespace dokuwiki\test\mock; + +/** + * Class dokuwiki\Plugin\DokuWiki_Auth_Plugin + */ +class AuthDeletePlugin extends AuthPlugin { + + public $loggedOff = false; + + public function __construct($canDeleteUser = true) { + $this->cando['delUser'] = $canDeleteUser; + } + + public function checkPass($user, $pass) { + return $pass == 'password'; + } + + public function deleteUsers($users) { + return in_array($_SERVER['REMOTE_USER'], $users); + } + + public function logoff() { + $this->loggedOff = true; + } + +}
\ No newline at end of file |