예제 #1
0
파일: Ldap.php 프로젝트: hugutux/booked
 private function Synchronize($username)
 {
     $registration = $this->GetRegistration();
     $registration->Synchronize(new AuthenticatedUser($username, $this->user->GetEmail(), $this->user->GetFirstName(), $this->user->GetLastName(), $this->password, Configuration::Instance()->GetKey(ConfigKeys::LANGUAGE), Configuration::Instance()->GetDefaultTimezone(), $this->user->GetPhone(), $this->user->GetInstitution(), $this->user->GetTitle()));
 }
예제 #2
0
 public function testMapsUserAttributes()
 {
     $mapping = array('sn' => 'sn', 'givenname' => 'givenname', 'mail' => 'fooName');
     $entry = new TestLdapEntry();
     $entry->Set('sn', 'sn');
     $entry->Set('givenname', 'given');
     $entry->Set('fooName', 'foo');
     $entry->Set('telephonenumber', 'phone');
     $user = new LdapUser($entry, $mapping);
     $this->assertEquals('sn', $user->GetLastName());
     $this->assertEquals('given', $user->GetFirstName());
     $this->assertEquals('foo', $user->GetEmail());
     $this->assertEquals('phone', $user->GetPhone());
 }