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

Commit

Permalink
Merged pull, updated test to match
Browse files Browse the repository at this point in the history
  • Loading branch information
stevebauman committed Apr 15, 2015
1 parent e1a8afc commit f0cadd6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Adldap/Objects/LdapSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ public function setAttribute($key, $value)
return $this;
}

/**
* Constructs a schema compatible with the LDAP protocol.
*
* @param Schema $schema
* @return $this
*/
private function constructLdapSchema(Schema $schema)
{
// Set all the LDAP attributes
Expand Down Expand Up @@ -63,6 +69,8 @@ private function constructLdapSchema(Schema $schema)

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

$this->setAttribute('employeeId', $schema->getAttribute('employee_id'));

$this->setAttribute('accountExpires', $schema->getAttribute('expires'));

$this->setAttribute('givenName', $schema->getAttribute('firstname'));
Expand Down
2 changes: 2 additions & 0 deletions tests/AdldapMethodTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ public function testAdldapSchema()
'description' => 'Description',
'display_name' => 'Display Name',
'email' => 'Email',
'employee_id' => 'Employee ID',
'expires' => 'Expires',
'firstname' => 'First Name',
'home_directory' => 'Home Directory',
Expand Down Expand Up @@ -167,6 +168,7 @@ public function testAdldapSchema()
'description' => array('Description'),
'displayName' => array('Display Name'),
'mail' => array('Email'),
'employeeId' => array('Employee ID'),
'accountExpires' => array('Expires'),
'givenName' => array('First Name'),
'homeDirectory' => array('Home Directory'),
Expand Down

0 comments on commit f0cadd6

Please sign in to comment.