summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3addc58)
raw | patch | inline | side by side (parent: 3addc58)
author | blainett <blainett@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 6 Jul 2005 13:42:23 +0000 (13:42 +0000) | ||
committer | blainett <blainett@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 6 Jul 2005 13:42:23 +0000 (13:42 +0000) |
Bug: uid/cn is get now from the dn
Bug: subnode ou=addr is now created and removed
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@924 594d385d-05f5-0310-b6e9-bd551577e9d8
Bug: subnode ou=addr is now created and removed
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@924 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/personal/connectivity/class_oxchangeAccount.inc | patch | blob | history |
diff --git a/plugins/personal/connectivity/class_oxchangeAccount.inc b/plugins/personal/connectivity/class_oxchangeAccount.inc
index a77d8c2decfba24c1fd03b34ad86006e610d3475..ff48e3f6b9f663250f104495866d99650614c5f2 100644 (file)
$this->attributes, "Save");
$ldap->modify($this->attrs);
show_ldap_error($ldap->get_error());
-
+ if($ldap->dn_exists("ou=addr,".$this->dn)){
+ $ldap->rmdir("ou=addr,".$this->dn);
+ show_ldap_error($ldap->get_error());
+ }
/* Optionally execute a command after we're done */
$this->postremove();
{
$needupdate=TRUE;
+ $istemplate=FALSE;
+
+
+/* print "<pre>".print_r($this->attrs, true)."</pre>";*/
+
/*First at all, we must check if this is new or is updated */
+ /*Also check is we have a template, if is a template, is a new user */
if (isset($this->attrs['objectClass'])){
foreach ($this->attrs['objectClass'] as $object){
if($object=="OXUserObject") $needupdate=FALSE;
+ if($object=="gosaUserTemplate") $istemplate=TRUE;
}
- $uid=$this->attrs[$this->dnmode][0];
- }else{
-
- if($this->dnmode="uid") $uid=$this->parent->by_object['user']->uid;
- else $uid=$this->parent->by_object['user']->sn." ".$this->parent->by_object['user']->givenName;
}
+ $uidarray=array();
+ preg_match("/^(\w+(?=\=))=((\w|\s)+(?=\,)),.*/",$this->dn,$uidarray);
+ $uid=$uidarray[2];
+
+ if ($istemplate) $needupdate=TRUE;
+
if($needupdate){
/* Trying to open a Postgresql Database Server */
if (function_exists("pg_connect")){
}
}
-
-
plugin::save();
/* Write back to ldap */
$this->postcreate();
if($needupdate){
+ $ldap->create_missing_trees("ou=addr,".$this->dn);
+ show_ldap_error($ldap->get_error());
/* Finally save data to postgresql server */
pg_set_client_encoding ("UNICODE");
$nv = "SELECT nextval ('serial_id')";