Copyright 2008-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Author: Gunnar Wrobel (wrobel@pardus.de)
Inheritance: extends Horde_Kolab_Server_Search_Operation_Guid
Example #1
0
 public function testMethodRestrictkolabHasResultRestrictedToKolabUsers()
 {
     $result = $this->getMock('Horde_Kolab_Server_Result_Interface');
     $result->expects($this->once())->method('asArray')->will($this->returnValue(array('a' => 'a')));
     $this->structure->expects($this->once())->method('find')->with($this->isRestrictedToKolabUsers(), array('attributes' => 'guid'))->will($this->returnValue($result));
     $search = new Horde_Kolab_Server_Search_Operation_Restrictkolab($this->structure);
     $criteria = $this->getMock('Horde_Kolab_Server_Query_Element_Interface');
     $this->assertEquals(array('a'), $search->searchRestrictkolab($criteria));
 }
Example #2
0
 /**
  * Return all KolabInetOrgPersons with the given mail or alias address.
  *
  * @param string $mail  The mail address to search for.
  * @param string $alias The alias address to search for.
  *
  * @return array The GUID(s).
  *
  * @throws Horde_Kolab_Server_Exception
  */
 public function searchGuidForMailOrAlias($mail, $alias)
 {
     $criteria = new Horde_Kolab_Server_Query_Element_Or(new Horde_Kolab_Server_Query_Element_Equals('Mail', $mail), new Horde_Kolab_Server_Query_Element_Equals('Alias', $alias));
     return parent::searchRestrictKolab($criteria);
 }
Example #3
0
 /**
  * Return all KolabInetOrgPersons with the given uid.
  *
  * @param string $uid The uid to search for.
  *
  * @return array The GUID(s).
  *
  * @throws Horde_Kolab_Server_Exception
  */
 public function searchGuidForUid($uid)
 {
     $criteria = new Horde_Kolab_Server_Query_Element_Equals('uid', $uid);
     return parent::searchRestrictKolab($criteria);
 }
Example #4
0
 /**
  * Return all KolabInetOrgPersons with the given mail.
  *
  * @param string $mail The mail to search for.
  *
  * @return array The GUID(s).
  *
  * @throws Horde_Kolab_Server_Exception
  */
 public function searchGuidForMail($mail)
 {
     $criteria = new Horde_Kolab_Server_Query_Element_Equals('mail', $mail);
     return parent::searchRestrictKolab($criteria);
 }
 /**
  * Return all KolabInetOrgPersons with the given uid, mail or alias address.
  *
  * @param string $id The uid or mail address or alias address to search for.
  *
  * @return array The GUID(s).
  *
  * @throws Horde_Kolab_Server_Exception
  */
 public function searchGuidForUidOrMailOrAlias($id)
 {
     $criteria = new Horde_Kolab_Server_Query_Element_Or(array(new Horde_Kolab_Server_Query_Element_Equals('Uid', $id), new Horde_Kolab_Server_Query_Element_Equals('Mail', $id), new Horde_Kolab_Server_Query_Element_Equals('Alias', $id)));
     return parent::searchRestrictKolab($criteria);
 }
Example #6
0
 /**
  * Return all KolabInetOrgPersons with the given alias.
  *
  * @param string $alias The alias address to search for.
  *
  * @return array The GUID(s).
  *
  * @throws Horde_Kolab_Server_Exception
  */
 public function searchGuidForAlias($alias)
 {
     $criteria = new Horde_Kolab_Server_Query_Element_Equals('alias', $alias);
     return parent::searchRestrictKolab($criteria);
 }