mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:19:00 +01:00
fix some problem in Univention install
This commit is contained in:
parent
a70600d964
commit
afaf5a1ece
20
addressbook/inc/class.addressbook_univention.inc.php
Normal file
20
addressbook/inc/class.addressbook_univention.inc.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* Addressbook - Univention Backend
|
||||
*
|
||||
* @link http://www.egroupware.org
|
||||
* @author Ralf Becker <rb@stylite.de>
|
||||
* @package addressbook
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* Univention backend for accounts
|
||||
*
|
||||
* There's currently no difference to LDAP backend
|
||||
*/
|
||||
class addressbook_univention extends addressbook_ldap
|
||||
{
|
||||
|
||||
}
|
@ -778,7 +778,7 @@ function set_univention_defaults()
|
||||
if (!is_array($domains)) $domains = explode("\n", $domains);
|
||||
$domain = array_shift($domains);
|
||||
$config['smtpserver'] = "$mailserver,465,,,yes,tls";
|
||||
$config['smtp'] = 'no,emailadmin_smtp_ldap_univention';
|
||||
$config['smtp'] = ',emailadmin_smtp_ldap_univention';
|
||||
$config['mailserver'] = "$mailserver,993,$domain,email,tls";
|
||||
$config['imap'] = /*'cyrus,'._ucr_secret('cyrus')*/','.',emailadmin_imap_cyrus';
|
||||
$config['folder'] = 'INBOX/Sent,INBOX/Trash,INBOX/Drafts,INBOX/Templates,INBOX/Spam';
|
||||
|
@ -37,11 +37,13 @@ class accounts_univention extends accounts_ldap
|
||||
{
|
||||
if (!$data['account_id'] && $data['account_type'] !== 'g' && self::available())
|
||||
{
|
||||
$config = $this->frontend->config && $this->frontend->config['ldap_context'] ?
|
||||
$this->frontend->config : $GLOBALS['egw_info']['server'];
|
||||
$params = array(
|
||||
'users/user','create',
|
||||
'--binddn', $this->frontend->config['ldap_root_dn'],
|
||||
'--bindpwd', 5=>$this->frontend->config['ldap_root_pw'],
|
||||
'--position', $this->frontend->config['ldap_context'],
|
||||
'--binddn', $config['ldap_root_dn'],
|
||||
'--bindpwd', 5=>$config['ldap_root_pw'],
|
||||
'--position', $config['ldap_context'],
|
||||
'--set', 'username='.$data['account_lid'],
|
||||
'--set', 'firstname='.$data['account_firstname'],
|
||||
'--set', 'lastname='.$data['account_lastname'],
|
||||
@ -57,7 +59,7 @@ class accounts_univention extends accounts_ldap
|
||||
$cmd = self::DIRECTORY_MANAGER_BIN.' '.implode(' ', array_map('escapeshellarg', $params));
|
||||
$output_arr = $ret = $matches = null;
|
||||
exec($cmd, $output_arr, $ret);
|
||||
$output = explode("\n", $output_arr);
|
||||
$output = implode("\n", $output_arr);
|
||||
if ($ret || !preg_match('/^Object created: (uid=.*)$/mui', $output, $matches))
|
||||
{
|
||||
$params[5] = '********'; // mask out password!
|
||||
@ -65,7 +67,7 @@ class accounts_univention extends accounts_ldap
|
||||
throw new egw_exception_wrong_userinput($cmd."\nreturned\n".$output);
|
||||
}
|
||||
$data['account_dn'] = $matches[1];
|
||||
$data['account_id'] = $this->name2id($matches[1], 'account_dn', 'u');
|
||||
$data['account_id'] = $this->name2id($data['account_lid'], 'account_lid', 'u');
|
||||
}
|
||||
return parent::save($data);
|
||||
}
|
||||
|
@ -969,7 +969,7 @@ class setup
|
||||
|
||||
function setup_account_object(array $config=array())
|
||||
{
|
||||
if (!isset($this->accounts) || $config)
|
||||
if (!isset($this->accounts) || $this->accounts->config || $config)
|
||||
{
|
||||
if (!is_object($this->db))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user