Index: /sandbox/2.5.1-evolucao/expressoAdmin1_2/controller.php
===================================================================
--- /sandbox/2.5.1-evolucao/expressoAdmin1_2/controller.php	(revision 8231)
+++ /sandbox/2.5.1-evolucao/expressoAdmin1_2/controller.php	(revision 8236)
@@ -27,5 +27,5 @@
 			$array_files = array(); 		
  			for($idx = 1; $idx <= $count_files; ++$idx) {
- 				if($_FILES['file_'.$idx] && !$_FILES['file_'.$idx]['error'])
+ 				if(isset($_FILES['file_'.$idx]) && $_FILES['file_'.$idx] && !$_FILES['file_'.$idx]['error'])
  					$array_files[] = $_FILES['file_'.$idx]; 					 
  			}
Index: /sandbox/2.5.1-evolucao/expressoAdmin1_2/inc/class.db_functions.inc.php
===================================================================
--- /sandbox/2.5.1-evolucao/expressoAdmin1_2/inc/class.db_functions.inc.php	(revision 8231)
+++ /sandbox/2.5.1-evolucao/expressoAdmin1_2/inc/class.db_functions.inc.php	(revision 8236)
@@ -238,5 +238,5 @@
 			$user_in_group[] = $this->db->row();
 		
-		if (count($user_in_group) == 0)
+		if (!isset($user_in_group) || count($user_in_group) == 0)
 		{
 			$sql = "INSERT INTO phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) "
Index: /sandbox/2.5.1-evolucao/expressoAdmin1_2/inc/class.user.inc.php
===================================================================
--- /sandbox/2.5.1-evolucao/expressoAdmin1_2/inc/class.user.inc.php	(revision 7243)
+++ /sandbox/2.5.1-evolucao/expressoAdmin1_2/inc/class.user.inc.php	(revision 8236)
@@ -102,5 +102,5 @@
 				$user_info['userPassword']				= '{md5}' . base64_encode(pack("H*",md5($params['password1'])));
 				
-				if ($params['passwd_expired'] == '1')
+				if (isset($params['passwd_expired']) && $params['passwd_expired'] == '1')
 					$user_info['phpgwLastPasswdChange'] = '0';
 				
@@ -136,9 +136,9 @@
 				}
 				
-				if ($params['deliverymode'])
+				if (isset($params['deliverymode']) && $params['deliverymode'])
 					$user_info['deliveryMode'] = 'forwardOnly';
 			
 				//Ocultar da pesquisa e do catálogo
-				if ($params['phpgwaccountvisible'])
+				if (isset($params['phpgwaccountvisible']) && $params['phpgwaccountvisible'])
 					$user_info['phpgwAccountVisible'] = '-1';
 
@@ -245,5 +245,5 @@
 			
 				// Inclusao do Mail do usuário nas listas de email selecionadas.
-				if ($params['maillists'])
+				if (isset($params['maillists']) && $params['maillists'])
 				{
 					foreach($params['maillists'] as $uid)
Index: /sandbox/2.5.1-evolucao/expressoAdmin1_2/inc/class.maillist.inc.php
===================================================================
--- /sandbox/2.5.1-evolucao/expressoAdmin1_2/inc/class.maillist.inc.php	(revision 585)
+++ /sandbox/2.5.1-evolucao/expressoAdmin1_2/inc/class.maillist.inc.php	(revision 8236)
@@ -98,5 +98,5 @@
 				$maillist_info['accountStatus'] = 'active';
 			
-			if ($params['phpgwAccountVisible'] == 'on')
+			if (isset($params['phpgwAccountVisible']) && $params['phpgwAccountVisible'] == 'on')
 				$maillist_info['phpgwAccountVisible'] = '-1';
 						
Index: /sandbox/2.5.1-evolucao/expressoAdmin1_2/inc/class.group.inc.php
===================================================================
--- /sandbox/2.5.1-evolucao/expressoAdmin1_2/inc/class.group.inc.php	(revision 5133)
+++ /sandbox/2.5.1-evolucao/expressoAdmin1_2/inc/class.group.inc.php	(revision 8236)
@@ -108,5 +108,5 @@
 			
 			// ADD ATTRIBUTES
-			if ($params['phpgwaccountvisible'] == 'on')
+			if (isset($params['phpgwaccountvisible']) && $params['phpgwaccountvisible'] == 'on')
 			{
 				$group_info['phpgwaccountvisible'] = '-1';
Index: /sandbox/2.5.1-evolucao/expressoAdmin1_2/inc/class.ldap_functions.inc.php
===================================================================
--- /sandbox/2.5.1-evolucao/expressoAdmin1_2/inc/class.ldap_functions.inc.php	(revision 8235)
+++ /sandbox/2.5.1-evolucao/expressoAdmin1_2/inc/class.ldap_functions.inc.php	(revision 8236)
@@ -990,5 +990,5 @@
 		$result['status'] = true;
 		
-		if ($_SESSION['phpgw_info']['expresso']['global_denied_groups'][$cn])
+		if (isset($_SESSION['phpgw_info']['expresso']['global_denied_groups'][$cn]) && $_SESSION['phpgw_info']['expresso']['global_denied_groups'][$cn])
 		{
 			$result['status'] = false;
@@ -1058,5 +1058,5 @@
 		$result['status'] = true;
 		
-		if ($_SESSION['phpgw_info']['expresso']['global_denied_users'][$uid])
+		if (isset($_SESSION['phpgw_info']['expresso']['global_denied_users'][$uid]) && $_SESSION['phpgw_info']['expresso']['global_denied_users'][$uid])
 		{
 			$result['status'] = false;
@@ -1874,4 +1874,5 @@
 				$sector_dn_array = explode(",", $entry[0]['dn']);
                 $sector_dn_array_count = count($sector_dn_array);
+				$sector_dn = '';
 				for($i=1; $i<$sector_dn_array_count; ++$i)
 					$sector_dn .= $sector_dn_array[$i] . ',';
@@ -1883,5 +1884,5 @@
 				$result['description']			= $entry[0]['description'][0];
 				$result['gidnumber']			= $entry[0]['gidnumber'][0];
-				$result['phpgwaccountvisible']	= $entry[0]['phpgwaccountvisible'][0];
+				$result['phpgwaccountvisible']	= isset($entry[0]['phpgwaccountvisible']) ? $entry[0]['phpgwaccountvisible'][0] : '';
 				$result['email']				= $entry[0]['mail'][0];
 		
@@ -1938,8 +1939,9 @@
 					if ($entry[0]['objectclass'][$i] == 'sambaGroupMapping')
 						$result['sambaGroup'] = true;
-
-					$a_tmp = explode("-", $entry[0]['sambasid'][0]);
-					array_pop($a_tmp);
-					$result['sambasid'] = implode("-", $a_tmp);
+					if (isset($entry[0]['sambasid'])){
+						$a_tmp = explode("-",$entry[0]['sambasid'][0]);
+						array_pop($a_tmp);
+						$result['sambasid'] = implode("-", $a_tmp);
+					}
 				}
 				return $result;
