From 08f99e2b03d36809aaec0aa34bfc7fea1f6f2add Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 29 Jul 2010 08:15:54 +0000 Subject: [PATCH] Updated CSV import. -Fixed problem using some counter variable twice, $i was messed up. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@19202 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../ldapmanager/addons/ldapmanager/class_csvimport.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gosa-plugins/ldapmanager/addons/ldapmanager/class_csvimport.inc b/gosa-plugins/ldapmanager/addons/ldapmanager/class_csvimport.inc index 39cd5fe31..7565a656f 100644 --- a/gosa-plugins/ldapmanager/addons/ldapmanager/class_csvimport.inc +++ b/gosa-plugins/ldapmanager/addons/ldapmanager/class_csvimport.inc @@ -158,7 +158,7 @@ class csvimport extends plugin $dat = $this->csvinfo['sorteddata'][$i]; /* If not all needed vars set .... */ - if( ( empty($dat['sn']))||( empty($dat['givenName']))||( empty($dat['uid']))|| + if(( empty($dat['sn']))||( empty($dat['givenName']))||( empty($dat['uid']))|| (!isset($dat['sn']))||(!isset($dat['givenName']))||(!isset($dat['uid']))){ /* Output Error */ @@ -194,13 +194,12 @@ class csvimport extends plugin } // Setting user Password - if((isset($dat['userPassword']))&&(!empty($dat['userPassword']))) + if((isset($dat['userPassword']))&&(!empty($dat['userPassword']))){ $password = $dat['userPassword']; - else - { + }else{ $rand_str=""; $feed = "0123456789abcdefghijklmnopqrstuvwxyz"; - for ($i=0; $i < 8; $i++) + for ($e=0; $e < 8; $e++) { $rand_str .= substr($feed, rand(0, strlen($feed)-1), 1); } @@ -218,6 +217,7 @@ class csvimport extends plugin $this->usertab->save(); change_password($this->usertab->dn,$password); } + $this->usertab->dn; } } -- 2.30.2