1: <?php
2: declare(strict_types=1);
3:
4: /**
5: * Copyright (C) Apis Networks, Inc - All Rights Reserved.
6: *
7: * Unauthorized copying of this file, via any medium, is
8: * strictly prohibited without consent. Any dissemination of
9: * material herein is prohibited.
10: *
11: * For licensing inquiries email <licensing@apisnetworks.com>
12: *
13: * Written by Matt Saladna <matt@apisnetworks.com>, May 2017
14: */
15: class Dav_Module extends Module_Skeleton implements \Module\Skeleton\Contracts\Hookable
16: {
17: const PAM_FILE = 'dav.pamlist';
18:
19: public function _create()
20: {
21: $path = $this->domain_fs_path() . '/etc/' . self::PAM_FILE;
22: if (!DAV_ENABLED) {
23: touch($path);
24:
25: return;
26: }
27: file_put_contents($path, $this->username . "\n");
28: }
29:
30: public function _verify_conf(\Opcenter\Service\ConfigurationContext $ctx): bool
31: {
32: return true;
33: }
34:
35: public function _delete()
36: {
37: // TODO: Implement _delete() method.
38: }
39:
40: public function _edit()
41: {
42: // TODO: Implement _edit() method.
43: }
44:
45: public function _create_user(string $user)
46: {
47: // TODO: Implement _create_user() method.
48: }
49:
50: public function _delete_user(string $user)
51: {
52: // TODO: Implement _delete_user() method.
53: }
54:
55: public function _edit_user(string $userold, string $usernew, array $oldpwd)
56: {
57: // TODO: Implement _edit_user() method.
58: }
59:
60:
61: }