|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* @link https://github.com/chrmorandi/yii2-ldap for the canonical source repository |
|
4
|
|
|
* @package yii2-ldap |
|
5
|
|
|
* @author Christopher Mota <[email protected]> |
|
6
|
|
|
* @license MIT License - view the LICENSE file that was distributed with this source code. |
|
7
|
|
|
*/ |
|
8
|
|
|
|
|
9
|
|
|
namespace chrmorandi\ldap\schemas; |
|
10
|
|
|
|
|
11
|
|
|
use DateTime; |
|
12
|
|
|
|
|
13
|
|
|
/** |
|
14
|
|
|
* |
|
15
|
|
|
* @since 1.0.0 |
|
16
|
|
|
*/ |
|
17
|
|
|
class ADUser implements SchemaInterface |
|
18
|
|
|
{ |
|
19
|
|
|
use SchemaTrait; |
|
20
|
|
|
|
|
21
|
|
|
/** |
|
22
|
|
|
* Contain the object class for make user in AD |
|
23
|
|
|
* User: This class is used to store information about an employee or contractor who works for an organization. |
|
24
|
|
|
* It is also possible to apply this class to long term visitors. |
|
25
|
|
|
* Person: Contains personal information about a user. |
|
26
|
|
|
* OrganizationalPerson: This class is used for objects that contain organizational information about a user, such |
|
27
|
|
|
* as the employee number, department, manager, title, office address, and so on. |
|
28
|
|
|
* Top: The top level class from which all classes are derived. |
|
29
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms680932(v=vs.85).aspx |
|
30
|
|
|
* @var array |
|
31
|
|
|
*/ |
|
32
|
|
|
public static $objectClass = ['user', 'person', 'organizationalPerson', 'top']; |
|
33
|
|
|
|
|
34
|
|
|
/** |
|
35
|
|
|
* The date when the account expires. This value represents the number of 100-nanosecond |
|
36
|
|
|
* intervals since January 1, 1601 (UTC). A value of 0 or 0x7FFFFFFFFFFFFFFF |
|
37
|
|
|
* (9223372036854775807) indicates that the account never expires. |
|
38
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms675098(v=vs.85).aspx |
|
39
|
|
|
* @var DateTime|false |
|
40
|
|
|
*/ |
|
41
|
|
|
public $accountExpires = 9223372036854775807; |
|
42
|
|
|
|
|
43
|
|
|
/** |
|
44
|
|
|
* The number of times the user tried to log on to the account using |
|
45
|
|
|
* an incorrect password. A value of 0 indicates that the |
|
46
|
|
|
* value is unknown. |
|
47
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms675244(v=vs.85).aspx |
|
48
|
|
|
* @var int |
|
49
|
|
|
*/ |
|
50
|
|
|
public $badPwdCount; |
|
51
|
|
|
|
|
52
|
|
|
/** |
|
53
|
|
|
* The user's company name. |
|
54
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms675457(v=vs.85).aspx |
|
55
|
|
|
* @var string |
|
56
|
|
|
*/ |
|
57
|
|
|
public $company; |
|
58
|
|
|
|
|
59
|
|
|
/** |
|
60
|
|
|
* The entry's country attribute. |
|
61
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms675432(v=vs.85).aspx |
|
62
|
|
|
* @var string |
|
63
|
|
|
*/ |
|
64
|
|
|
public $c; |
|
65
|
|
|
|
|
66
|
|
|
/** |
|
67
|
|
|
* The name that represents an object. Used to perform searches. |
|
68
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms675449(v=vs.85).aspx |
|
69
|
|
|
* @var string |
|
70
|
|
|
*/ |
|
71
|
|
|
public $cn; |
|
72
|
|
|
|
|
73
|
|
|
/** |
|
74
|
|
|
* Contains the name for the department in which the user works. |
|
75
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms675490(v=vs.85).aspx |
|
76
|
|
|
* @var string |
|
77
|
|
|
*/ |
|
78
|
|
|
public $department; |
|
79
|
|
|
|
|
80
|
|
|
/** |
|
81
|
|
|
* Contains the description to display for an object. This value is restricted |
|
82
|
|
|
* as single-valued for backward compatibility in some cases but |
|
83
|
|
|
* is allowed to be multi-valued in others. |
|
84
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms675492(v=vs.85).aspx |
|
85
|
|
|
* @var string |
|
86
|
|
|
*/ |
|
87
|
|
|
public $description; |
|
88
|
|
|
|
|
89
|
|
|
/** |
|
90
|
|
|
* The display name for an object. This is usually the combination |
|
91
|
|
|
* of the users first name, middle initial, and last name. |
|
92
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms675514(v=vs.85).aspx |
|
93
|
|
|
* @var string |
|
94
|
|
|
*/ |
|
95
|
|
|
public $displayName; |
|
96
|
|
|
|
|
97
|
|
|
/** |
|
98
|
|
|
* The user's division. |
|
99
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms675518(v=vs.85).aspx |
|
100
|
|
|
* @var string |
|
101
|
|
|
*/ |
|
102
|
|
|
public $division; |
|
103
|
|
|
|
|
104
|
|
|
/** |
|
105
|
|
|
* The ID of an employee. |
|
106
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms675662(v=vs.85).aspx |
|
107
|
|
|
* @var string |
|
108
|
|
|
*/ |
|
109
|
|
|
public $employeeID; |
|
110
|
|
|
|
|
111
|
|
|
/** |
|
112
|
|
|
* The number assigned to an employee other than the ID. |
|
113
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms675663(v=vs.85).aspx |
|
114
|
|
|
* @var string |
|
115
|
|
|
*/ |
|
116
|
|
|
public $employeeNumber; |
|
117
|
|
|
|
|
118
|
|
|
/** |
|
119
|
|
|
* The job category for an employee. |
|
120
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms675664(v=vs.85).aspx |
|
121
|
|
|
* @var string |
|
122
|
|
|
*/ |
|
123
|
|
|
public $employeeType; |
|
124
|
|
|
|
|
125
|
|
|
/** |
|
126
|
|
|
* Contains the given name (first name) of the user. |
|
127
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms675719(v=vs.85).aspx |
|
128
|
|
|
* @var string |
|
129
|
|
|
*/ |
|
130
|
|
|
public $givenName; |
|
131
|
|
|
|
|
132
|
|
|
/** |
|
133
|
|
|
* The user's main home phone number. |
|
134
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms676192(v=vs.85).aspx |
|
135
|
|
|
* @var string |
|
136
|
|
|
*/ |
|
137
|
|
|
public $homePhone; |
|
138
|
|
|
|
|
139
|
|
|
/** |
|
140
|
|
|
* Contains the initials for parts of the user's full name. This may be used as |
|
141
|
|
|
* the middle initial in the Windows Address Book. |
|
142
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms676202(v=vs.85).aspx |
|
143
|
|
|
* @var string |
|
144
|
|
|
*/ |
|
145
|
|
|
public $initials; |
|
146
|
|
|
|
|
147
|
|
|
/** |
|
148
|
|
|
* The TCP/IP address for the phone. Used by Telephony. |
|
149
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms676213(v=vs.85).aspx |
|
150
|
|
|
* @var string |
|
151
|
|
|
*/ |
|
152
|
|
|
public $ipPhone; |
|
153
|
|
|
|
|
154
|
|
|
/** |
|
155
|
|
|
* The date and time (UTC) that this account was locked out. This value is stored |
|
156
|
|
|
* as a large integer that represents the number of 100-nanosecond intervals since |
|
157
|
|
|
* January 1, 1601 (UTC). A value of zero means that the account is not currently |
|
158
|
|
|
* locked out. |
|
159
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms676843(v=vs.85).aspx |
|
160
|
|
|
* @var DateTime|false |
|
161
|
|
|
*/ |
|
162
|
|
|
public $lockoutTime; |
|
163
|
|
|
|
|
164
|
|
|
/** |
|
165
|
|
|
* The list of email addresses for a contact. |
|
166
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms676855(v=vs.85).aspx |
|
167
|
|
|
* @var string |
|
168
|
|
|
*/ |
|
169
|
|
|
public $mail; |
|
170
|
|
|
|
|
171
|
|
|
/** |
|
172
|
|
|
* Contains the distinguished name of the user who is the user's manager. |
|
173
|
|
|
* The manager's user object contains a directReports property that contains |
|
174
|
|
|
* references to all user objects that have their manager properties set to this |
|
175
|
|
|
* distinguished name. |
|
176
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms676859(v=vs.85).aspx |
|
177
|
|
|
* @var string |
|
178
|
|
|
*/ |
|
179
|
|
|
public $manager; |
|
180
|
|
|
|
|
181
|
|
|
/** |
|
182
|
|
|
* The distinguished name of the groups to which this object belongs. |
|
183
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms677099(v=vs.85).aspx |
|
184
|
|
|
* @var array |
|
185
|
|
|
*/ |
|
186
|
|
|
public $memberOf; |
|
187
|
|
|
|
|
188
|
|
|
/** |
|
189
|
|
|
* The primary mobile phone number. |
|
190
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms677119(v=vs.85).aspx |
|
191
|
|
|
* @var string |
|
192
|
|
|
*/ |
|
193
|
|
|
public $mobile; |
|
194
|
|
|
|
|
195
|
|
|
/** |
|
196
|
|
|
* The name of the company or organization. |
|
197
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms679009(v=vs.85).aspx |
|
198
|
|
|
* @var string |
|
199
|
|
|
*/ |
|
200
|
|
|
public $o; |
|
201
|
|
|
|
|
202
|
|
|
/** |
|
203
|
|
|
* The unique identifier for an object. |
|
204
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms679021(v=vs.85).aspx |
|
205
|
|
|
* @var type |
|
206
|
|
|
*/ |
|
207
|
|
|
public $objectGuid; |
|
208
|
|
|
|
|
209
|
|
|
/** |
|
210
|
|
|
* A binary value that specifies the security identifier (SID) of the user. The SID is a unique value used to |
|
211
|
|
|
* identify the user as a security principal. |
|
212
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms679024(v=vs.85).aspx |
|
213
|
|
|
* @var string |
|
214
|
|
|
*/ |
|
215
|
|
|
public $objectSid; |
|
216
|
|
|
|
|
217
|
|
|
/** |
|
218
|
|
|
* The date and time that the password for this account was last changed. This value is stored as a large |
|
219
|
|
|
* integer that represents the number of 100 nanosecond intervals since January 1, 1601 (UTC). If this value |
|
220
|
|
|
* is set to 0 and the User-Account-Control attribute does not contain the UF_DONT_EXPIRE_PASSWD |
|
221
|
|
|
* flag, then the user must set the password at the next logon. |
|
222
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms679430(v=vs.85).aspx |
|
223
|
|
|
* @var type |
|
224
|
|
|
*/ |
|
225
|
|
|
public $pwdLastSet; |
|
226
|
|
|
|
|
227
|
|
|
/** |
|
228
|
|
|
* The logon name used to support clients and servers running earlier versions of the operating system, such |
|
229
|
|
|
* as Windows NT 4.0, Windows 95, Windows 98, and LAN Manager. |
|
230
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms679635(v=vs.85).aspx |
|
231
|
|
|
* @var type |
|
232
|
|
|
*/ |
|
233
|
|
|
public $sAMAccountName; |
|
234
|
|
|
|
|
235
|
|
|
/** |
|
236
|
|
|
* The name of a user's state or province. |
|
237
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms679880(v=vs.85).aspx |
|
238
|
|
|
* @var string |
|
239
|
|
|
*/ |
|
240
|
|
|
public $st; |
|
241
|
|
|
|
|
242
|
|
|
/** |
|
243
|
|
|
* The street address. |
|
244
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms679882(v=vs.85).aspx |
|
245
|
|
|
* @var string |
|
246
|
|
|
*/ |
|
247
|
|
|
public $streetAddress; |
|
248
|
|
|
|
|
249
|
|
|
/** |
|
250
|
|
|
* This attribute contains the family or last name for a user. |
|
251
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms679872(v=vs.85).aspx |
|
252
|
|
|
* @var string |
|
253
|
|
|
*/ |
|
254
|
|
|
public $sn; |
|
255
|
|
|
|
|
256
|
|
|
/** |
|
257
|
|
|
* The primary telephone number. |
|
258
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms680027(v=vs.85).aspx |
|
259
|
|
|
* @return string |
|
260
|
|
|
*/ |
|
261
|
|
|
public $telephoneNumber; |
|
262
|
|
|
|
|
263
|
|
|
/** |
|
264
|
|
|
* Contains the user's job title. This property is commonly used to indicate the formal job title, such as Senior |
|
265
|
|
|
* Programmer, rather than occupational class, such as programmer. It is not typically used for suffix titles |
|
266
|
|
|
* such as Esq. or DDS. |
|
267
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms680037(v=vs.85).aspx |
|
268
|
|
|
* @var type |
|
269
|
|
|
*/ |
|
270
|
|
|
public $title; |
|
271
|
|
|
|
|
272
|
|
|
/** |
|
273
|
|
|
* Flags that control the behavior of the user account. |
|
274
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms680832(v=vs.85).aspx |
|
275
|
|
|
* @return string |
|
276
|
|
|
*/ |
|
277
|
|
|
public $userAccountControl; |
|
278
|
|
|
|
|
279
|
|
|
/** |
|
280
|
|
|
* his attribute contains the UPN that is an Internet-style login name for |
|
281
|
|
|
* a user based on the Internet standard RFC 822. |
|
282
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms680857(v=vs.85).aspx |
|
283
|
|
|
* @return string |
|
284
|
|
|
*/ |
|
285
|
|
|
public $userPrincipalName; |
|
286
|
|
|
|
|
287
|
|
|
/** |
|
288
|
|
|
* The entry's created at attribute. |
|
289
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms680924(v=vs.85).aspx |
|
290
|
|
|
* @var DateTime |
|
291
|
|
|
*/ |
|
292
|
|
|
public $whenCreated; |
|
293
|
|
|
|
|
294
|
|
|
/** |
|
295
|
|
|
* The date when this object was last changed. |
|
296
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms680921(v=vs.85).aspx |
|
297
|
|
|
* @var DateTime |
|
298
|
|
|
*/ |
|
299
|
|
|
public $whenChanged; |
|
300
|
|
|
|
|
301
|
|
|
/** |
|
302
|
|
|
* A web page that is the primary landing page of a website. |
|
303
|
|
|
* @link https://msdn.microsoft.com/en-us/library/ms680927(v=vs.85).aspx |
|
304
|
|
|
* @var string |
|
305
|
|
|
*/ |
|
306
|
|
|
public $wWWHomePage; |
|
307
|
|
|
|
|
308
|
|
|
} |
|
309
|
|
|
|