summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c54f4e8)
raw | patch | inline | side by side (parent: c54f4e8)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 29 Sep 2008 07:01:51 +0000 (07:01 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 29 Sep 2008 07:01:51 +0000 (07:01 +0000) |
-Problems detecting the accounts uid. The uid was extracted out of the dn and this wasn't working in all cases
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12552 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12552 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/openxchange/personal/connectivity/openxchange/class_oxchangeAccount.inc | patch | blob | history |
diff --git a/gosa-plugins/openxchange/personal/connectivity/openxchange/class_oxchangeAccount.inc b/gosa-plugins/openxchange/personal/connectivity/openxchange/class_oxchangeAccount.inc
index f9f1337aad8521244c48076b9ae2ac1d00f7c3c7..3e60cd6f0df57acb229b3f7adf04f7486e9d8476 100644 (file)
var $timezones=array();
var $dnmode= "";
var $uid ="";
+ var $parent = NULL;
- function oxchangeAccount (&$config, $dn= NULL)
+ function oxchangeAccount (&$config, $dn= NULL,&$parent)
{
- plugin::plugin ($config, $dn);
+ plugin::plugin ($config, $dn,$parent);
+ $this->parent = &$parent;
for ($i=0;$i<count($this->config->data['TABS']['CONNECTIVITY']);$i++){
if($this->config->data['TABS']['CONNECTIVITY'][$i]['CLASS']=='oxchangeAccount') {
$this->oxconf=$this->config->data['TABS']['CONNECTIVITY'][$i];
/* Save to LDAP */
function save()
{
-
$needupdate=TRUE;
$istemplate=FALSE;
if($object=="gosaUserTemplate") $istemplate=TRUE;
}
}
+
+ /* Detect accounts uid
+ */
+ if(!isset($this->attrs[$this->dnmode][0])){
+ $uid = $this->parent->by_object['user']->uid;
+ }else{
+ $uid=$this->attrs[$this->dnmode][0];
+ }
- $uidarray=array();
- preg_match("/^(\w+(?=\=))=((\w|\s|\.)+(?=\,)),.*/",$this->dn,$uidarray);
- $uid=$uidarray[2];
if (trim($uid) == "") {
msg_dialog::display(_("Error"), msgPool::invalid(_("Open-Xchange account name")), ERROR_DIALOG);
return;