Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame^] | 1 | <?php |
| 2 | |
| 3 | namespace LdapRecord\Models\FreeIPA; |
| 4 | |
| 5 | class User extends Entry |
| 6 | { |
| 7 | /** |
| 8 | * The object classes of the LDAP model. |
| 9 | * |
| 10 | * @var array |
| 11 | */ |
| 12 | public static $objectClasses = [ |
| 13 | 'top', |
| 14 | 'person', |
| 15 | 'inetorgperson', |
| 16 | 'organizationalperson', |
| 17 | ]; |
| 18 | |
| 19 | /** |
| 20 | * Retrieve groups that the current user is apart of. |
| 21 | * |
| 22 | * @return \LdapRecord\Models\Relations\HasMany |
| 23 | */ |
| 24 | public function groups() |
| 25 | { |
| 26 | return $this->hasMany(Group::class, 'member'); |
| 27 | } |
| 28 | } |