Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame^] | 1 | <?php |
| 2 | |
| 3 | namespace Adldap\Models\Concerns; |
| 4 | |
| 5 | trait 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 | } |