Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Commit f0cadd6

Browse files
committed
Merged pull, updated test to match
adldap/adLDAP#50
1 parent e1a8afc commit f0cadd6

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/Adldap/Objects/LdapSchema.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ public function setAttribute($key, $value)
3636
return $this;
3737
}
3838

39+
/**
40+
* Constructs a schema compatible with the LDAP protocol.
41+
*
42+
* @param Schema $schema
43+
* @return $this
44+
*/
3945
private function constructLdapSchema(Schema $schema)
4046
{
4147
// Set all the LDAP attributes
@@ -63,6 +69,8 @@ private function constructLdapSchema(Schema $schema)
6369

6470
$this->setAttribute('mail', $schema->getAttribute('email'));
6571

72+
$this->setAttribute('employeeId', $schema->getAttribute('employee_id'));
73+
6674
$this->setAttribute('accountExpires', $schema->getAttribute('expires'));
6775

6876
$this->setAttribute('givenName', $schema->getAttribute('firstname'));

tests/AdldapMethodTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ public function testAdldapSchema()
115115
'description' => 'Description',
116116
'display_name' => 'Display Name',
117117
'email' => 'Email',
118+
'employee_id' => 'Employee ID',
118119
'expires' => 'Expires',
119120
'firstname' => 'First Name',
120121
'home_directory' => 'Home Directory',
@@ -167,6 +168,7 @@ public function testAdldapSchema()
167168
'description' => array('Description'),
168169
'displayName' => array('Display Name'),
169170
'mail' => array('Email'),
171+
'employeeId' => array('Employee ID'),
170172
'accountExpires' => array('Expires'),
171173
'givenName' => array('First Name'),
172174
'homeDirectory' => array('Home Directory'),

0 commit comments

Comments
 (0)