1
|
|
|
<?php |
2
|
|
|
/****************************************************************************** |
3
|
|
|
* Wikipedia Account Creation Assistance tool * |
4
|
|
|
* ACC Development Team. Please see team.json for a list of contributors. * |
5
|
|
|
* * |
6
|
|
|
* This is free and unencumbered software released into the public domain. * |
7
|
|
|
* Please see LICENSE.md for the full licencing statement. * |
8
|
|
|
******************************************************************************/ |
9
|
|
|
|
10
|
|
|
namespace Waca\DataObjects; |
11
|
|
|
|
12
|
|
|
use DateTime; |
13
|
|
|
use Waca\IIdentificationVerifier; |
14
|
|
|
|
15
|
|
|
/** |
16
|
|
|
* User data object |
17
|
|
|
*/ |
18
|
|
|
class CommunityUser extends User |
19
|
2 |
|
{ |
20
|
|
|
public function getId() |
21
|
2 |
|
{ |
22
|
|
|
return -1; |
23
|
|
|
} |
24
|
|
|
|
25
|
|
|
public function save() |
26
|
|
|
{ |
27
|
|
|
// Do nothing |
28
|
|
|
} |
29
|
|
|
|
30
|
|
|
#region properties |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* @return string |
34
|
|
|
*/ |
35
|
|
|
public function getUsername() |
36
|
|
|
{ |
37
|
|
|
return '[Community]'; |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
public function setUsername($username) |
41
|
|
|
{ |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* @return string |
46
|
|
|
*/ |
47
|
|
|
public function getEmail() |
48
|
|
|
{ |
49
|
|
|
global $cDataClearEmail; |
50
|
|
|
|
51
|
|
|
return $cDataClearEmail; |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
public function setEmail($email) |
55
|
|
|
{ |
56
|
|
|
} |
57
|
|
|
|
58
|
|
|
public function getStatus() |
59
|
|
|
{ |
60
|
|
|
return "Community"; |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
public function getOnWikiName() |
64
|
|
|
{ |
65
|
|
|
return "127.0.0.1"; |
66
|
|
|
} |
67
|
|
|
|
68
|
|
|
public function setOnWikiName($onWikiName) |
69
|
|
|
{ |
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
public function getLastActive() |
73
|
|
|
{ |
74
|
|
|
$now = new DateTime(); |
75
|
|
|
|
76
|
|
|
return $now->format("Y-m-d H:i:s"); |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
public function getForceLogout() |
80
|
|
|
{ |
81
|
|
|
return true; |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
public function setForceLogout($forceLogout) |
85
|
|
|
{ |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* @param string $status |
90
|
|
|
*/ |
91
|
|
|
public function setStatus($status) |
92
|
|
|
{ |
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
public function getConfirmationDiff() |
96
|
|
|
{ |
97
|
|
|
return null; |
98
|
|
|
} |
99
|
|
|
|
100
|
|
|
public function setConfirmationDiff($confirmationDiff) |
101
|
|
|
{ |
102
|
|
|
} |
103
|
|
|
|
104
|
|
|
|
105
|
|
|
public function setUseAlternateSkin($useAlternate) |
|
|
|
|
106
|
|
|
{ |
107
|
|
|
} |
108
|
|
|
|
109
|
|
|
#endregion |
110
|
|
|
|
111
|
|
|
#region user access checks |
112
|
|
|
|
113
|
|
|
public function isNewUser() |
114
|
|
|
{ |
115
|
|
|
return false; |
116
|
|
|
} |
117
|
|
|
|
118
|
|
|
public function isDeactivated(): bool |
119
|
|
|
{ |
120
|
|
|
return false; |
121
|
|
|
} |
122
|
|
|
|
123
|
|
|
public function isCommunityUser() |
124
|
|
|
{ |
125
|
|
|
return true; |
126
|
|
|
} |
127
|
|
|
|
128
|
|
|
#endregion |
129
|
|
|
|
130
|
|
|
public function getApprovalDate() |
131
|
|
|
{ |
132
|
|
|
$data = DateTime::createFromFormat("Y-m-d H:i:s", "1970-01-01 00:00:00"); |
133
|
|
|
|
134
|
2 |
|
return $data; |
135
|
|
|
} |
136
|
|
|
} |
137
|
|
|
|
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.