blob: 3aee2a5cc773ede96216be7c3b1df42cd2e6251f [file] [log] [blame]
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +02001<?php
2
3namespace Adldap\Models\Concerns;
4
5trait HasLastLogonAndLogOff
6{
7 /**
8 * Returns the models's last log off date.
9 *
10 * @link https://msdn.microsoft.com/en-us/library/ms676822(v=vs.85).aspx
11 *
12 * @return string
13 */
14 public function getLastLogOff()
15 {
16 return $this->getFirstAttribute($this->schema->lastLogOff());
17 }
18
19 /**
20 * Returns the models's last log on date.
21 *
22 * @link https://msdn.microsoft.com/en-us/library/ms676823(v=vs.85).aspx
23 *
24 * @return string
25 */
26 public function getLastLogon()
27 {
28 return $this->getFirstAttribute($this->schema->lastLogOn());
29 }
30
31 /**
32 * Returns the models's last log on timestamp.
33 *
34 * @link https://msdn.microsoft.com/en-us/library/ms676824(v=vs.85).aspx
35 *
36 * @return string
37 */
38 public function getLastLogonTimestamp()
39 {
40 return $this->getFirstAttribute($this->schema->lastLogOnTimestamp());
41 }
42}