Beispiel #1
0
 public function testGetDNandUsername()
 {
     list($access, $config, $filesys, $image, $log, $avaMgr, $db, $userMgr) = $this->getTestInstances();
     $uid = 'alice';
     $dn = 'uid=alice,dc=foo,dc=bar';
     $user = new User($uid, $dn, $access, $config, $filesys, $image, $log, $avaMgr, $userMgr);
     $this->assertSame($dn, $user->getDN());
     $this->assertSame($uid, $user->getUsername());
 }
Beispiel #2
0
 /**
  * check if a user exists on LDAP
  * @param string|\OCA\User_LDAP\User\User $user either the ownCloud user
  * name or an instance of that user
  * @return boolean
  */
 public function userExistsOnLDAP($user)
 {
     $id = $user instanceof User ? $user->getUsername() : $user;
     return $this->handleRequest($id, 'userExistsOnLDAP', array($user));
 }