1 | <?php |
||
2 | /** |
||
3 | * sysPass |
||
4 | * |
||
5 | * @author nuxsmin |
||
6 | * @link https://syspass.org |
||
7 | * @copyright 2012-2019, Rubén Domínguez nuxsmin@$syspass.org |
||
8 | * |
||
9 | * This file is part of sysPass. |
||
10 | * |
||
11 | * sysPass is free software: you can redistribute it and/or modify |
||
12 | * it under the terms of the GNU General Public License as published by |
||
13 | * the Free Software Foundation, either version 3 of the License, or |
||
14 | * (at your option) any later version. |
||
15 | * |
||
16 | * sysPass is distributed in the hope that it will be useful, |
||
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
19 | * GNU General Public License for more details. |
||
20 | * |
||
21 | * You should have received a copy of the GNU General Public License |
||
22 | * along with sysPass. If not, see <http://www.gnu.org/licenses/>. |
||
23 | */ |
||
24 | |||
25 | namespace SP\DataModel; |
||
26 | |||
27 | defined('APP_ROOT') || die(); |
||
28 | |||
29 | /** |
||
30 | * Class UserBasicData |
||
31 | * |
||
32 | * @package SP\DataModel |
||
33 | */ |
||
34 | class UserData extends UserPassData implements DataModelInterface |
||
35 | { |
||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | public $login; |
||
40 | /** |
||
41 | * @var string |
||
42 | */ |
||
43 | public $ssoLogin; |
||
44 | /** |
||
45 | * @var string |
||
46 | */ |
||
47 | public $name; |
||
48 | /** |
||
49 | * @var string |
||
50 | */ |
||
51 | public $email; |
||
52 | /** |
||
53 | * @var string |
||
54 | */ |
||
55 | public $notes; |
||
56 | /** |
||
57 | * @var int |
||
58 | */ |
||
59 | public $userGroupId = 0; |
||
60 | /** |
||
61 | * @var int |
||
62 | */ |
||
63 | public $userProfileId = 0; |
||
64 | /** |
||
65 | * @var bool |
||
66 | */ |
||
67 | public $isAdminApp = 0; |
||
68 | /** |
||
69 | * @var bool |
||
70 | */ |
||
71 | public $isAdminAcc = 0; |
||
72 | /** |
||
73 | * @var bool |
||
74 | */ |
||
75 | public $isDisabled = 0; |
||
76 | /** |
||
77 | * @var bool |
||
78 | */ |
||
79 | public $isChangePass = 0; |
||
80 | /** |
||
81 | * @var bool |
||
82 | */ |
||
83 | public $isChangedPass = 0; |
||
84 | /** |
||
85 | * @var bool |
||
86 | */ |
||
87 | public $isLdap = 0; |
||
88 | /** |
||
89 | * @var int |
||
90 | */ |
||
91 | public $loginCount = 0; |
||
92 | /** |
||
93 | * @var string |
||
94 | */ |
||
95 | public $lastLogin; |
||
96 | /** |
||
97 | * @var string |
||
98 | */ |
||
99 | public $lastUpdate; |
||
100 | /** |
||
101 | * @var bool |
||
102 | */ |
||
103 | public $isMigrate = 0; |
||
104 | /** |
||
105 | * @var string |
||
106 | */ |
||
107 | public $preferences; |
||
108 | /** |
||
109 | * @var string |
||
110 | */ |
||
111 | public $userGroupName; |
||
112 | |||
113 | /** |
||
114 | * @return int |
||
115 | */ |
||
116 | public function getLoginCount() |
||
117 | { |
||
118 | return (int)$this->loginCount; |
||
119 | } |
||
120 | |||
121 | /** |
||
122 | * @param int $loginCount |
||
123 | */ |
||
124 | public function setLoginCount($loginCount) |
||
125 | { |
||
126 | $this->loginCount = (int)$loginCount; |
||
127 | } |
||
128 | |||
129 | /** |
||
130 | * @return string |
||
131 | */ |
||
132 | public function getLastLogin() |
||
133 | { |
||
134 | return $this->lastLogin; |
||
135 | } |
||
136 | |||
137 | /** |
||
138 | * @param string $lastLogin |
||
139 | */ |
||
140 | public function setLastLogin($lastLogin) |
||
141 | { |
||
142 | $this->lastLogin = $lastLogin; |
||
143 | } |
||
144 | |||
145 | /** |
||
146 | * @return string |
||
147 | */ |
||
148 | public function getLastUpdate() |
||
149 | { |
||
150 | return $this->lastUpdate; |
||
151 | } |
||
152 | |||
153 | /** |
||
154 | * @param string $lastUpdate |
||
155 | */ |
||
156 | public function setLastUpdate($lastUpdate) |
||
157 | { |
||
158 | $this->lastUpdate = $lastUpdate; |
||
159 | } |
||
160 | |||
161 | /** |
||
162 | * @return int |
||
163 | */ |
||
164 | public function isMigrate() |
||
165 | { |
||
166 | return (int)$this->isMigrate; |
||
167 | } |
||
168 | |||
169 | /** |
||
170 | * @param boolean $isMigrate |
||
171 | */ |
||
172 | public function setIsMigrate($isMigrate) |
||
173 | { |
||
174 | $this->isMigrate = (int)$isMigrate; |
||
0 ignored issues
–
show
|
|||
175 | } |
||
176 | |||
177 | /** |
||
178 | * @return string |
||
179 | */ |
||
180 | public function getPreferences() |
||
181 | { |
||
182 | return $this->preferences; |
||
183 | } |
||
184 | |||
185 | /** |
||
186 | * @param string $preferences |
||
187 | */ |
||
188 | public function setPreferences($preferences) |
||
189 | { |
||
190 | $this->preferences = $preferences; |
||
191 | } |
||
192 | |||
193 | /** |
||
194 | * @return string |
||
195 | */ |
||
196 | public function getEmail() |
||
197 | { |
||
198 | return $this->email; |
||
199 | } |
||
200 | |||
201 | /** |
||
202 | * @param string $email |
||
203 | */ |
||
204 | public function setEmail($email) |
||
205 | { |
||
206 | $this->email = $email; |
||
207 | } |
||
208 | |||
209 | /** |
||
210 | * @return string |
||
211 | */ |
||
212 | public function getNotes() |
||
213 | { |
||
214 | return $this->notes; |
||
215 | } |
||
216 | |||
217 | /** |
||
218 | * @param string $notes |
||
219 | */ |
||
220 | public function setNotes($notes) |
||
221 | { |
||
222 | $this->notes = $notes; |
||
223 | } |
||
224 | |||
225 | /** |
||
226 | * @return int |
||
227 | */ |
||
228 | public function getUserGroupId() |
||
229 | { |
||
230 | return (int)$this->userGroupId; |
||
231 | } |
||
232 | |||
233 | /** |
||
234 | * @param int $userGroupId |
||
235 | */ |
||
236 | public function setUserGroupId($userGroupId) |
||
237 | { |
||
238 | $this->userGroupId = (int)$userGroupId; |
||
239 | } |
||
240 | |||
241 | /** |
||
242 | * @return int |
||
243 | */ |
||
244 | public function getUserProfileId() |
||
245 | { |
||
246 | return (int)$this->userProfileId; |
||
247 | } |
||
248 | |||
249 | /** |
||
250 | * @param int $userProfileId |
||
251 | */ |
||
252 | public function setUserProfileId($userProfileId) |
||
253 | { |
||
254 | $this->userProfileId = (int)$userProfileId; |
||
255 | } |
||
256 | |||
257 | /** |
||
258 | * @return int |
||
259 | */ |
||
260 | public function isAdminApp() |
||
261 | { |
||
262 | return (int)$this->isAdminApp; |
||
263 | } |
||
264 | |||
265 | /** |
||
266 | * @param boolean $isAdminApp |
||
267 | */ |
||
268 | public function setIsAdminApp($isAdminApp) |
||
269 | { |
||
270 | $this->isAdminApp = (int)$isAdminApp; |
||
0 ignored issues
–
show
The property
$isAdminApp was declared of type boolean , but (int)$isAdminApp is of type integer . Maybe add a type cast?
This check looks for assignments to scalar types that may be of the wrong type. To ensure the code behaves as expected, it may be a good idea to add an explicit type cast. $answer = 42;
$correct = false;
$correct = (bool) $answer;
![]() |
|||
271 | } |
||
272 | |||
273 | /** |
||
274 | * @return int |
||
275 | */ |
||
276 | public function isAdminAcc() |
||
277 | { |
||
278 | return (int)$this->isAdminAcc; |
||
279 | } |
||
280 | |||
281 | /** |
||
282 | * @param boolean $isAdminAcc |
||
283 | */ |
||
284 | public function setIsAdminAcc($isAdminAcc) |
||
285 | { |
||
286 | $this->isAdminAcc = (int)$isAdminAcc; |
||
0 ignored issues
–
show
The property
$isAdminAcc was declared of type boolean , but (int)$isAdminAcc is of type integer . Maybe add a type cast?
This check looks for assignments to scalar types that may be of the wrong type. To ensure the code behaves as expected, it may be a good idea to add an explicit type cast. $answer = 42;
$correct = false;
$correct = (bool) $answer;
![]() |
|||
287 | } |
||
288 | |||
289 | /** |
||
290 | * @return int |
||
291 | */ |
||
292 | public function isDisabled() |
||
293 | { |
||
294 | return (int)$this->isDisabled; |
||
295 | } |
||
296 | |||
297 | /** |
||
298 | * @param boolean $isDisabled |
||
299 | */ |
||
300 | public function setIsDisabled($isDisabled) |
||
301 | { |
||
302 | $this->isDisabled = (int)$isDisabled; |
||
0 ignored issues
–
show
The property
$isDisabled was declared of type boolean , but (int)$isDisabled is of type integer . Maybe add a type cast?
This check looks for assignments to scalar types that may be of the wrong type. To ensure the code behaves as expected, it may be a good idea to add an explicit type cast. $answer = 42;
$correct = false;
$correct = (bool) $answer;
![]() |
|||
303 | } |
||
304 | |||
305 | /** |
||
306 | * @return int |
||
307 | */ |
||
308 | public function isChangePass() |
||
309 | { |
||
310 | return (int)$this->isChangePass; |
||
311 | } |
||
312 | |||
313 | /** |
||
314 | * @param boolean $isChangePass |
||
315 | */ |
||
316 | public function setIsChangePass($isChangePass) |
||
317 | { |
||
318 | $this->isChangePass = (int)$isChangePass; |
||
0 ignored issues
–
show
The property
$isChangePass was declared of type boolean , but (int)$isChangePass is of type integer . Maybe add a type cast?
This check looks for assignments to scalar types that may be of the wrong type. To ensure the code behaves as expected, it may be a good idea to add an explicit type cast. $answer = 42;
$correct = false;
$correct = (bool) $answer;
![]() |
|||
319 | } |
||
320 | |||
321 | /** |
||
322 | * @return int |
||
323 | */ |
||
324 | public function isLdap() |
||
325 | { |
||
326 | return (int)$this->isLdap; |
||
327 | } |
||
328 | |||
329 | /** |
||
330 | * @param boolean $isLdap |
||
331 | */ |
||
332 | public function setIsLdap($isLdap) |
||
333 | { |
||
334 | $this->isLdap = (int)$isLdap; |
||
0 ignored issues
–
show
The property
$isLdap was declared of type boolean , but (int)$isLdap is of type integer . Maybe add a type cast?
This check looks for assignments to scalar types that may be of the wrong type. To ensure the code behaves as expected, it may be a good idea to add an explicit type cast. $answer = 42;
$correct = false;
$correct = (bool) $answer;
![]() |
|||
335 | } |
||
336 | |||
337 | /** |
||
338 | * @return string |
||
339 | */ |
||
340 | public function getLogin() |
||
341 | { |
||
342 | return $this->login; |
||
343 | } |
||
344 | |||
345 | /** |
||
346 | * @param string $login |
||
347 | */ |
||
348 | public function setLogin($login) |
||
349 | { |
||
350 | $this->login = $login; |
||
351 | } |
||
352 | |||
353 | /** |
||
354 | * @return string |
||
355 | */ |
||
356 | public function getName() |
||
357 | { |
||
358 | return $this->name; |
||
359 | } |
||
360 | |||
361 | /** |
||
362 | * @param string $name |
||
363 | */ |
||
364 | public function setName($name) |
||
365 | { |
||
366 | $this->name = $name; |
||
367 | } |
||
368 | |||
369 | /** |
||
370 | * @return string |
||
371 | */ |
||
372 | public function getUserGroupName() |
||
373 | { |
||
374 | return $this->userGroupName; |
||
375 | } |
||
376 | |||
377 | /** |
||
378 | * @param string $userGroupName |
||
379 | */ |
||
380 | public function setUserGroupName($userGroupName) |
||
381 | { |
||
382 | $this->userGroupName = $userGroupName; |
||
383 | } |
||
384 | |||
385 | /** |
||
386 | * @return int |
||
387 | */ |
||
388 | public function isChangedPass() |
||
389 | { |
||
390 | return (int)$this->isChangedPass; |
||
391 | } |
||
392 | |||
393 | /** |
||
394 | * @param int $isChangedPass |
||
395 | */ |
||
396 | public function setIsChangedPass($isChangedPass) |
||
397 | { |
||
398 | $this->isChangedPass = (int)$isChangedPass; |
||
0 ignored issues
–
show
The property
$isChangedPass was declared of type boolean , but (int)$isChangedPass is of type integer . Maybe add a type cast?
This check looks for assignments to scalar types that may be of the wrong type. To ensure the code behaves as expected, it may be a good idea to add an explicit type cast. $answer = 42;
$correct = false;
$correct = (bool) $answer;
![]() |
|||
399 | } |
||
400 | |||
401 | /** |
||
402 | * @return string |
||
403 | */ |
||
404 | public function getSsoLogin() |
||
405 | { |
||
406 | return $this->ssoLogin; |
||
407 | } |
||
408 | |||
409 | /** |
||
410 | * @param string $ssoLogin |
||
411 | */ |
||
412 | public function setSsoLogin($ssoLogin) |
||
413 | { |
||
414 | $this->ssoLogin = $ssoLogin; |
||
415 | } |
||
416 | } |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.