-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathAccounts.php
77 lines (62 loc) · 1.12 KB
/
Accounts.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
/**
* Accounts class
*
* @package Framework
*/
/**
* User Account management class.
*
* @author Marco Ceppi <[email protected]>
* @since November 8, 2010
* @package Framework
* @subpackage Users
*/
class Accounts
{
private $data = array();
function Accounts()
{
$this->userdomains;
}
function __get( $name )
{
if( !array_key_exists($name, $this->data) )
{
if( method_exists(__CLASS__, "_get_$name") )
{
$method = "_get_$name";
$this->data[$name] = $this->$$method();
}
else
{
return false;
}
}
return $this->data[$name];
}
function __set( $name, $val )
{
$this->data[$name] = $val;
}
private function _get_userdomains()
{
$userdomains = array();
if( !$data_array = file('/etc/userdomains') )
{
return false;
}
foreach( $data_array as $line )
{
list($domain, $user) = explode(' ', $line);
$userdomains[$user][$domain] = NULL;
}
return $userdomains;
}
private function _set_userdomains( $val )
{
}
function addUserdomain( $user, $domain )
{
}
}