summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3da8fef)
raw | patch | inline | side by side (parent: 3da8fef)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 10 Mar 2008 12:00:53 +0000 (12:00 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 10 Mar 2008 12:00:53 +0000 (12:00 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9555 594d385d-05f5-0310-b6e9-bd551577e9d8
index 963db36b3a45a2f95323c9076920585580c89ab0..e8c58cacb43626a404da0edefc013806a9351ee3 100644 (file)
$this->ldap->referrals= $this->current['REFERRAL'];
}
}
- return ($this->ldap);
+
+ return new ldapMultiplexer($this->ldap);
}
function set_current($name)
index 742315ad3e6142a55b81185b95e16d48da369d2d..560f809cfe44c98ba0bb6bbc6338fef1619a5119 100644 (file)
class LDAP{
var $hascon =false;
- var $hasres =false;
var $reconnect=false;
var $tls = false;
- var $basedn ="";
var $cid;
+ var $hasres = array();
+ var $sr = array();
+ var $basedn ="";
+ var $start = array(); // 0 if we are fetching the first entry, otherwise 1
var $error = ""; // Any error messages to be returned can be put here
- var $start = 0; // 0 if we are fetching the first entry, otherwise 1
+ var $srp = 0;
var $objectClasses = array(); // Information read from slapd.oc.conf
var $binddn = "";
var $bindpw = "";
}
+ function getSearchResource()
+ {
+ $this->sr[$this->srp]= NULL;
+ $this->start[$this->srp]= 0;
+ $this->hasres[$this->srp]= false;
+ return $this->srp++;
+ }
+
+
/* Function to replace all problematic characters inside a DN by \001XX, where
\001 is decoded to chr(1) [ctrl+a]. It is not impossible, but very unlikely
that this character is inside a DN.
function cd($dir)
{
- if ($dir == "..")
+ if ($dir == ".."){
$this->basedn = $this->getParentDir();
- else
+ } else {
$this->basedn = LDAP::convert($dir);
+ }
}
function getParentDir($basedn = "")
{
- if ($basedn=="")
+ if ($basedn==""){
$basedn = $this->basedn;
- else
+ } else {
$basedn = LDAP::convert($this->basedn);
+ }
return(ereg_replace("[^,]*[,]*[ ]*(.*)", "\\1", $basedn));
}
- function search($filter, $attrs= array())
+ function search($srp, $filter, $attrs= array())
{
if($this->hascon){
if ($this->reconnect) $this->connect();
$start = microtime();
- $this->clearResult();
- $this->sr = @ldap_search($this->cid, LDAP::fix($this->basedn), $filter, $attrs);
+ $this->clearResult($srp);
+ $this->sr[$srp] = @ldap_search($this->cid, LDAP::fix($this->basedn), $filter, $attrs);
$this->error = @ldap_error($this->cid);
- $this->resetResult();
- $this->hasres=true;
+ $this->resetResult($srp);
+ $this->hasres[$srp]=true;
/* Check if query took longer as specified in max_ldap_query_time */
if($this->max_ldap_query_time){
}
$this->log("LDAP operation: time=".get_MicroTimeDiff($start,microtime())." operation=search('".LDAP::fix($this->basedn)."', '$filter')");
- return($this->sr);
+ return($this->sr[$srp]);
}else{
$this->error = "Could not connect to LDAP server";
return("");
}
}
- function ls($filter = "(objectclass=*)", $basedn = "",$attrs = array("*"))
+ function ls($srp, $filter = "(objectclass=*)", $basedn = "",$attrs = array("*"))
{
if($this->hascon){
if ($this->reconnect) $this->connect();
- $this->clearResult();
+ $this->clearResult($srp);
if ($basedn == "")
$basedn = $this->basedn;
else
$basedn= LDAP::convert($basedn);
$start = microtime();
- $this->sr = @ldap_list($this->cid, LDAP::fix($basedn), $filter,$attrs);
+ $this->sr[$srp] = @ldap_list($this->cid, LDAP::fix($basedn), $filter,$attrs);
$this->error = @ldap_error($this->cid);
- $this->resetResult();
- $this->hasres=true;
+ $this->resetResult($srp);
+ $this->hasres[$srp]=true;
/* Check if query took longer as specified in max_ldap_query_time */
if($this->max_ldap_query_time){
$this->log("LDAP operation: time=".get_MicroTimeDiff($start,microtime())." operation=ls('".LDAP::fix($basedn)."', '$filter')");
- return($this->sr);
+ return($this->sr[$srp]);
}else{
$this->error = "Could not connect to LDAP server";
return("");
}
}
- function cat($dn,$attrs= array("*"))
+ function cat($srp, $dn,$attrs= array("*"))
{
if($this->hascon){
if ($this->reconnect) $this->connect();
- $this->clearResult();
+ $this->clearResult($srp);
$filter = "(objectclass=*)";
- $this->sr = @ldap_read($this->cid, LDAP::fix($dn), $filter,$attrs);
+ $this->sr[$srp] = @ldap_read($this->cid, LDAP::fix($dn), $filter,$attrs);
$this->error = @ldap_error($this->cid);
- $this->resetResult();
- $this->hasres=true;
- return($this->sr);
+ $this->resetResult($srp);
+ $this->hasres[$srp]=true;
+ return($this->sr[$srp]);
}else{
$this->error = "Could not connect to LDAP server";
return("");
}
}
- function fetch()
+ function fetch($srp)
{
$att= array();
if($this->hascon){
- if($this->hasres){
- if ($this->start == 0)
+ if($this->hasres[$srp]){
+ if ($this->start[$srp] == 0)
{
- if ($this->sr){
- $this->start = 1;
- $this->re= @ldap_first_entry($this->cid, $this->sr);
+ if ($this->sr[$srp]){
+ $this->start[$srp] = 1;
+ $this->re= @ldap_first_entry($this->cid, $this->sr[$srp]);
} else {
return array();
}
}
return($att);
}else{
- $this->error = "Perform a Fetch with no Search";
+ $this->error = "Perform a fetch with no search";
return("");
}
}else{
}
}
- function resetResult()
+ function resetResult($srp)
{
- $this->start = 0;
+ $this->start[$srp] = 0;
}
- function clearResult()
+ function clearResult($srp)
{
- if($this->hasres){
- $this->hasres = false;
- @ldap_free_result($this->sr);
+ if($this->hasres[$srp]){
+ $this->hasres[$srp] = false;
+ @ldap_free_result($this->sr[$srp]);
}
}
- function getDN()
+ function getDN($srp)
{
if($this->hascon){
- if($this->hasres){
+ if($this->hasres[$srp]){
if(!$this->re)
{
}
}
- function count()
+ function count($srp)
{
if($this->hascon){
- if($this->hasres){
- $rv = @ldap_count_entries($this->cid, $this->sr);
+ if($this->hasres[$srp]){
+ $rv = @ldap_count_entries($this->cid, $this->sr[$srp]);
$this->error = @ldap_error($this->cid);
return($rv);
}else{
*
*/
- function rmdir_recursive($deletedn)
+ function rmdir_recursive($srp, $deletedn)
{
if($this->hascon){
if ($this->reconnect) $this->connect();
$delarray= array();
/* Get sorted list of dn's to delete */
- $this->ls ("(objectClass=*)",$deletedn);
- while ($this->fetch()){
- $deldn= $this->getDN();
+ $this->ls ($srp, "(objectClass=*)",$deletedn);
+ while ($this->fetch($srp)){
+ $deldn= $this->getDN($srp);
$delarray[$deldn]= strlen($deldn);
}
arsort ($delarray);
/* Really Delete ALL dn's in subtree */
foreach ($delarray as $key => $value){
- $this->rmdir_recursive($key);
+ $this->rmdir_recursive($srp, $key);
}
/* Finally Delete own Node */
}
}
- function create_missing_trees($target)
+ function create_missing_trees($srp, $target)
{
global $config;
continue;
}
- $this->cat ($cdn);
- $attrs= $this->fetch();
+ $this->cat ($srp, $cdn);
+ $attrs= $this->fetch($srp);
/* Create missing entry? */
if (count ($attrs)){
}
- function recursive_remove()
+ function recursive_remove($srp)
{
$delarray= array();
/* Get sorted list of dn's to delete */
- $this->search ("(objectClass=*)");
- while ($this->fetch()){
- $deldn= $this->getDN();
+ $this->search ($srp, "(objectClass=*)");
+ while ($this->fetch($srp)){
+ $deldn= $this->getDN($srp);
$delarray[$deldn]= strlen($deldn);
}
arsort ($delarray);
}
- function gen_ldif ($dn, $filter= "(objectClass=*)", $attributes= array('*'), $recursive= TRUE)
+ function gen_ldif ($srp, $dn, $filter= "(objectClass=*)", $attributes= array('*'), $recursive= TRUE)
{
$display= "";
if ($recursive){
$this->cd($dn);
- $this->ls($filter,$dn, array('dn','objectClass'));
+ $this->ls($srp, $filter,$dn, array('dn','objectClass'));
$deps = array();
$display .= $this->gen_one_entry($dn)."\n";
- while ($attrs= $this->fetch()){
+ while ($attrs= $this->fetch($srp)){
$deps[] = $attrs['dn'];
}
foreach($deps as $dn){
- $display .= $this->gen_ldif($dn, $filter,$attributes,$recursive);
+ $display .= $this->gen_ldif($srp, $dn, $filter,$attributes,$recursive);
}
} else {
$display.= $this->gen_one_entry($dn);
}
- function gen_xls ($dn, $filter= "(objectClass=*)", $attributes= array('*'), $recursive= TRUE,$r_array=0)
+ function gen_xls ($srp, $dn, $filter= "(objectClass=*)", $attributes= array('*'), $recursive= TRUE,$r_array=0)
{
$display= array();
$this->cd($dn);
- $this->search("$filter");
+ $this->search($srp, "$filter");
$i=0;
- while ($attrs= $this->fetch()){
+ while ($attrs= $this->fetch($srp)){
$j=0;
foreach ($attributes as $at){
if JustMofify id false the destination dn will be overwritten by the new ldif.
*/
- function import_complete_ldif($str_attr,&$error,$JustModify,$DeleteOldEntries)
+ function import_complete_ldif($srp, $str_attr,&$error,$JustModify,$DeleteOldEntries)
{
if($this->reconnect) $this->connect();
}
/* If we can't Import, return with a file error */
- if(!$this->import_single_entry($single,$usemodify,$usermdir) ) {
+ if(!$this->import_single_entry($srp, $single,$usemodify,$usermdir) ) {
$error= sprintf(_("Error while importing dn: '%s', please check your LDIF from line %s on!"), $line,
$current_line);
return UNKNOWN_TOKEN_IN_LDIF_FILE; }
if $modify is true; All variables that are not touched by the new ldif will be kept.
if $modify is false; The new ldif overwrites the old entry, and all untouched attributes get lost.
*/
- function import_single_entry($str_attr,$modify,$delete)
+ function import_single_entry($srp, $str_attr,$modify,$delete)
{
global $config;
/* Delete existing entry */
if($delete){
- $this->rmdir_recursive($data['dn']);
+ $this->rmdir_recursive($srp, $data['dn']);
}
/* Create missing trees */
$this->cd ($this->basedn);
$this->cd($config->current['BASE']);
- $this->create_missing_trees(preg_replace("/^[^,]+,/","",$data['dn']));
+ $this->create_missing_trees($srp, preg_replace("/^[^,]+,/","",$data['dn']));
$this->cd($data['dn']);
$dn = $data['dn'];
if(!$modify){
- $this->cat($dn);
- if($this->count()){
+ $this->cat($srp, $dn);
+ if($this->count($srp)){
/* The destination entry exists, overwrite it with the new entry */
- $attrs = $this->fetch();
+ $attrs = $this->fetch($srp);
foreach($attrs as $name => $value ){
if(!is_numeric($name)){
if(in_array($name,array("dn","count"))) continue;
diff --git a/gosa-core/include/class_ldapMultiplexer.inc b/gosa-core/include/class_ldapMultiplexer.inc
--- /dev/null
@@ -0,0 +1,70 @@
+<?php
+/*
+ * This code is part of GOsa (http://www.gosa-project.org)
+ * Copyright (C) 2003-2008 GONICUS GmbH
+ *
+ * ID: $$Id: class_plugin.inc 9466 2008-03-08 15:59:37Z cajus $$
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+class ldapMultiplexer {
+
+ /* Internal stuff */
+ protected $object;
+
+ /* Caching switch - not implemented right now */
+ protected $use_cache= false;
+
+ /* Result resource */
+ protected $sr;
+
+ public function __construct(&$object) {
+ /* Store object */
+ $this->object= $object;
+
+ /* Set result resource */
+ $this->sr= $this->object->getSearchResource();
+ }
+
+ public function __call($methodName, $parameters) {
+ $id = md5($methodName.serialize($parameters));
+
+ /* Add resource pointer if the mentioned methods are used */
+ if (preg_match('/^(search|ls|cat|fetch|clearResult|resetResult|count|getDN|recursive_remove|rmdir_recursive|gen_xls|gen_ldif|create_missing_trees|import_single_entry|import_complete_ldif)$/', $methodName)){
+ array_unshift($parameters, $this->sr);
+ }
+
+ try {
+ $class= new ReflectionClass($this->object);
+ $method= $class->getMethod($methodName);
+
+ return $method->invokeArgs($this->object, $parameters);
+ }
+
+ catch (ReflectionException $e) {
+ }
+ }
+
+
+ public function __get($memberName) {
+ echo "Obsolete access to member variable '$memberName'!<br>";
+ return $this->object->$memberName;
+ }
+
+}
+
+?>
index 72f0f26ae13850171bf272b7ebddbe59b8765148..2bd31a5e33f6829c5b6880509fe3bb8f64162807 100644 (file)
$ldap->cd($dst_dn);
$ldap->add($new);
- if ($ldap->error != "Success"){
+ if (!$ldap->success()){
trigger_error("Trying to save $dst_dn failed.",
E_USER_WARNING);
return(FALSE);
/* Delete source */
$ldap= $this->config->get_ldap_link();
$ldap->rmdir_recursive($src_dn);
- if ($ldap->error != "Success"){
+ if (!$ldap->success()){
trigger_error("Trying to delete $src_dn failed.",
E_USER_WARNING);
return (FALSE);
$password = $tmp['SNAPSHOT_PASSWORD'];
$snapldapbase = $tmp['SNAPSHOT_BASE'];
- $ldap_to = new LDAP($user,$password, $server);
+ $ldap_to = new ldapMultipelxer(new LDAP($user,$password, $server));
$ldap_to -> cd($snapldapbase);
if (!$ldap_to->success()){
$password = $cfg['SNAPSHOT_PASSWORD'];
$snapldapbase = $cfg['SNAPSHOT_BASE'];
- $ldap_to = new LDAP($user,$password, $server);
+ $ldap_to = new ldapMultiplexer(new LDAP($user,$password, $server));
$ldap_to -> cd ($snapldapbase);
if (!$ldap_to->success()){
msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap_to->get_error(), $snapldapbase, "", get_class()));
$user = $cfg['SNAPSHOT_USER'];
$password = $cfg['SNAPSHOT_PASSWORD'];
$snapldapbase = $cfg['SNAPSHOT_BASE'];
- $ldap_to = new LDAP($user,$password, $server);
+ $ldap_to = new ldapMultiplexer(new LDAP($user,$password, $server));
$ldap_to->cd ($snapldapbase);
if (!$ldap_to->success()){
msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap_to->get_error(), $snapldapbase, "", get_class()));
$user = $cfg['SNAPSHOT_USER'];
$password = $cfg['SNAPSHOT_PASSWORD'];
$snapldapbase = $cfg['SNAPSHOT_BASE'];
- $ldap_to = new LDAP($user,$password, $server);
+ $ldap_to = new ldapMultiplexer(new LDAP($user,$password, $server));
$ldap_to->cd ($snapldapbase);
if (!$ldap_to->success()){
msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap_to->get_error(), $snapldapbase, "", get_class()));
index b843bc6410f179d44bf07e9f545b9b118d231b3d..5ad63e34cf5e8f51fa60831d44f4c78c880effc9 100644 (file)
isset($config->current['TLS']) && $config->current['TLS'] == "true");
/* Sadly we've no proper return values here. Use the error message instead. */
- if (!preg_match("/Success/i", $ldap->error)){
+ if (!$ldap->success()){
echo sprintf(_("FATAL: Error when connecting the LDAP. Server said '%s'."), $ldap->get_error());
exit();
}
/* Look for entry or realm */
$ldap= $config->get_ldap_link();
- if (!preg_match("/Success/i", $ldap->error)){
+ if (!$ldap->success()){
msg_dialog::display(_("LDAP error"), sprintf(_('User login failed.').'<br><br>'._('LDAP server returned: %s'), "<br><br><i>".$ldap->get_error()."</i>"), ERROR_DIALOG);
$smarty= get_smarty();
$smarty->display(get_template_path('headers.tpl'));
/* Look for entry or realm */
$ldap= $config->get_ldap_link();
- if (!preg_match("/Success/i", $ldap->error)){
+ if (!$ldap->success()){
msg_dialog::display(_("LDAP error"), sprintf(_('User login failed.').'<br><br>'._('LDAP server returned: %s'), "<br><br><i>".$ldap->get_error()."</i>"), FATAL_ERROR_DIALOG);
$smarty= get_smarty();
$smarty->display(get_template_path('headers.tpl'));
/* look through the entire ldap */
$ldap = $config->get_ldap_link();
- if (!preg_match("/Success/i", $ldap->error)){
- msg_dialog::display(_("LDAP error"), sprintf(_("User login failed.")."<br><br>"._('LDAP server returned: %s'), "<br><br><i>".$ldap->get_error()."</i>"), FATAL_ERROR_DIALOG);
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error()), FATAL_ERROR_DIALOG);
$smarty= get_smarty();
$smarty->display(get_template_path('headers.tpl'));
echo "<body>".session::get('errors')."</body></html>";
$config->current['RECURSIVE'] == "true",
isset($config->current['TLS'])
&& $config->current['TLS'] == "true");
- if (!preg_match("/Success/i", $ldap->error)){
+ if (!$ldap->success()){
return (NULL);
}
$ldap->cd ($config->current['CONFIG']);
$ldap->search("(&(objectClass=gosaLockEntry)(gosaUser=$user)(gosaObject=".base64_encode($object)."))",
array("gosaUser"));
- if (!preg_match("/Success/i", $ldap->error)){
+ if (!$ldap->success()){
msg_dialog::display(_("Configuration error"), sprintf(_("Cannot create locking information in LDAP tree. Please contact your administrator!")."<br><br>"._('LDAP server returned: %s'), "<br><br><i>".$ldap->get_error()."</i>"), ERROR_DIALOG);
return;
}
$attrs["gosaObject"] = base64_encode($object);
$attrs["cn"] = "$name";
$ldap->add($attrs);
- if (!preg_match("/Success/i", $ldap->error)){
+ if (!$ldap->success()){
msg_dialog::display(_("Internal error"), sprintf(_("Adding a lock failed.")."<br><br>"._('LDAP server returned: %s'), "<br><br><i>".$ldap->get_error()."</i>"), ERROR_DIALOG);
return;
}
$ldap->cd ($config->current['CONFIG']);
$ldap->search ("(&(objectClass=gosaLockEntry)(gosaObject=".base64_encode($object)."))", array("gosaObject"));
$attrs= $ldap->fetch();
- if ($ldap->getDN() != "" && preg_match("/Success/i", $ldap->error)){
+ if ($ldap->getDN() != "" && $ldap->success()){
$ldap->rmdir ($ldap->getDN());
- if (!preg_match("/Success/i", $ldap->error)){
+ if (!$ldap->success()){
msg_dialog::display(_("LDAP error"), sprintf(_("Removing a lock failed.")."<br><br>"._('LDAP server returned: %s'), "<br><br><i>".$ldap->get_error()."</i>"), ERROR_DIALOG);
return;
}
$ldap= $config->get_ldap_link();
$ldap->cd ($config->current['CONFIG']);
$ldap->search("(&(objectClass=gosaLockEntry)(gosaObject=".base64_encode($object)."))", array("gosaUser"));
- if (!preg_match("/Success/i", $ldap->error)){
+ if (!$ldap->success()){
msg_dialog::display(_("LDAP error"), sprintf(_("Cannot get locking information from LDAP tree!")."<br><br>"._('LDAP server returned: %s'), "<br><br><i>".$ldap->get_error()."</i>"), ERROR_DIALOG);
return("");
}
$ldap= $config->get_ldap_link();
$ldap->cd ($config->current['CONFIG']);
$ldap->search($filter, array("gosaUser","gosaObject"));
- if (!preg_match("/Success/i", $ldap->error)){
+ if (!$ldap->success()){
msg_dialog::display(_("LDAP error"), sprintf(_("Cannot get locking information from LDAP tree!")."<br><br>"._('LDAP server returned: %s'), "<br><br><i>".$ldap->get_error()."</i>"), ERROR_DIALOG);
return("");
}
@@ -865,7 +865,7 @@ function get_sub_list($filter, $category,$sub_deps, $base= "", $attributes= arra
}
/* Check for size limit exceeded messages for GUI feedback */
- if (preg_match("/size limit/i", $ldap->error)){
+ if (preg_match("/size limit/i", $ldap->get_error())){
session::set('limit_exceeded', TRUE);
$limit_exceeded = TRUE;
}
@@ -934,7 +934,7 @@ function get_list($filter, $category, $base= "", $attributes= array(), $flags= G
}
/* Check for size limit exceeded messages for GUI feedback */
- if (preg_match("/size limit/i", $ldap->error)){
+ if (preg_match("/size limit/i", $ldap->get_error())){
session::set('limit_exceeded', TRUE);
}
$messages= array();
/* Get objectclasses */
- $ldap = new LDAP($cfg['admin'],$cfg['password'],$cfg['connection'] ,FALSE,$cfg['tls']);
+ $ldap = new ldapMultiplexer(new LDAP($cfg['admin'],$cfg['password'],$cfg['connection'] ,FALSE,$cfg['tls']));
$objectclasses = $ldap->get_objectclasses();
if(count($objectclasses) == 0){
msg_dialog::display(_("LDAP warning"), _("Cannot get schema information from server. No schema check possible!"), WARNING_DIALOG);
new log("modify","users/passwordMethod",$dn,array_keys($attrs),$ldap->get_error());
- if ($ldap->error != 'Success') {
+ if (!$ldap->success()) {
msg_dialog::display(_("LDAP error"), sprintf(_('Setting the password failed!').'<br><br>'._('LDAP server returned: %s'), "<br><br><i>".$ldap->get_error()."</i>"), ERROR_DIALOG);
} else {
diff --git a/gosa-core/plugins/admin/ogroups/class_ogroup.inc b/gosa-core/plugins/admin/ogroups/class_ogroup.inc
index 92460840c6beb9578d5f557f3ca33c8c3bb58bc0..f15d1b37881981e9843ac3295346a2786599b3cf 100644 (file)
$ldap->cat($dn, array("cn", "sn", "givenName", "ou", "description", "objectClass"));
/* It has failed, add entry with type flag I (Invalid)*/
- if ($ldap->error != "Success"){
+ if (!$ldap->success()){
$this->memberList[$dn]= array('text' => _("Non existing dn:")." ".@LDAP::fix($dn),"type" => "I");
} else {
diff --git a/gosa-core/plugins/personal/password/class_password.inc b/gosa-core/plugins/personal/password/class_password.inc
index 12e33d4d888062ba5a45482a182f798c91870ce9..014908f75ac24b2ab0445c0c9f956df4cd32f839 100644 (file)
isset($this->config->current['TLS']) && preg_match("/true/i",$this->config->current['TLS']));
/* connection Successfull ? */
- if ($tldap->error != "Success"){
+ if (!$tldap->success()){
msg_dialog::display(_("User password"),
_("The password you've entered as your current password doesn't match the real one."),WARNING_DIALOG);
}else{
diff --git a/gosa-core/plugins/personal/posix/class_posixAccount.inc b/gosa-core/plugins/personal/posix/class_posixAccount.inc
index c50bf1f8e7a0222e5a9d8eae6d13fc6edaa9af1a..1b54695c1d8a7b08d0ded02116557e3b42df78ef 100644 (file)
$res= get_list($filter, "groups", $base,$attrs, $Flags);
/* check sizelimit */
- if (preg_match("/size limit/i", $ldap->error)){
+ if (preg_match("/size limit/i", $ldap->get_error())){
session::set('limit_exceeded',TRUE);
}