1: <?php
2: /**
3: * This class provides Horde-specific code that extends the base LDAP driver.
4: *
5: * Copyright 2011-2012 Horde LLC (http://www.horde.org/)
6: *
7: * See the enclosed file COPYING for license information (LGPL). If you
8: * did not receive this file, see http://www.horde.org/licenses/lgpl21.
9: *
10: * @author Jan Schneider <jan@horde.org>
11: * @category Horde
12: * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
13: * @package Core
14: */
15: class Horde_Core_Group_Ldap extends Horde_Group_Ldap
16: {
17: /**
18: * Creates a new group.
19: *
20: * @param string $name A group name.
21: * @param string $email The group's email address.
22: *
23: * @return mixed The ID of the created group.
24: * @throws Horde_Group_Exception
25: */
26: public function create($name, $email = null)
27: {
28: try {
29: $entry = Horde::callHook('groupldap', array($name, $email));
30: return $this->_create($name, $entry);
31: } catch (Horde_Exception_HookNotSet $e) {
32: return parent::create($name, $email);
33: }
34: }
35: }
36: