Index: /trunk/expressoAdmin1_2/inc/class.ldap_functions.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.ldap_functions.inc.php	(revision 2878)
+++ /trunk/expressoAdmin1_2/inc/class.ldap_functions.inc.php	(revision 2892)
@@ -245,5 +245,5 @@
 				$result['status'] = false;
 				$result['msg'] = $this->functions->lang('Connection with ldap fail') . ".";
-				return $result;
+				return json_encode( $result );
 			}
 		}
@@ -270,5 +270,5 @@
 			$result['status'] = false;
 			$result['msg'] = $this->functions->lang('this login can not be used because is a system account') . ".";
-			return $result;
+			return json_encode( $result );
 		}
 		
@@ -319,5 +319,5 @@
 				$result['status'] = false;
 				$result['msg'] = $this->functions->lang('this login is already used by') . ":\n" . $users;
-				return $result;
+				return json_encode( $result );
 			}
 
@@ -331,5 +331,5 @@
 				$result['status'] = false;
 				$result['msg'] = $this->functions->lang('This login is being used by a group') . ".";
-				return $result;
+				return json_encode( $result );
 			}
 			
@@ -378,5 +378,5 @@
 						$result['msg'] = $this->functions->lang('this login is already used by a user in another organization') . ".";
 						ldap_close($ldap_connection2);
-						return $result;
+						return json_encode( $result );
 					}
 				}
@@ -387,5 +387,5 @@
 		if ($type == 'rename_user')
 		{
-			return $result;
+			return json_encode( $result );
 		}
 		
@@ -399,5 +399,5 @@
 				$result['status'] = false;
 				$result['msg'] = $this->functions->lang('this email address is being used by 1 user') . ": " . $entries[0]['uid'][0];
-				return $result;
+				return json_encode( $result );
 			}
 		}
@@ -405,5 +405,5 @@
 			$result['status'] = false;
 			$result['msg'] = $this->functions->lang('this email address is being used by 2 or more users') . ".";
-			return $result;
+			return json_encode( $result );
 		}
 		
@@ -417,5 +417,5 @@
 				$result['status'] = false;
 				$result['msg'] = $this->functions->lang('alternative email is being used by 1 user') . ": " . $entries[0]['uid'][0];
-				return $result;
+				return json_encode( $result );
 			}
 		}
@@ -423,5 +423,5 @@
 			$result['status'] = false;
 			$result['msg'] = $this->functions->lang('alternative email is being used by 2 or more users') . ".";
-			return $result;
+			return json_encode( $result );
 		}
 
@@ -435,5 +435,5 @@
 					$result['status'] = false;
 					$result['msg'] = $this->functions->lang('Field CPF is invalid') . '.';
-					return $result;
+					return json_encode( $result );
 				}
 				else
@@ -453,5 +453,5 @@
 						$result['status'] = false;
 						$result['msg'] = $this->functions->lang('Connection with ldap fail') . ".";
-						return $result;
+						return json_encode( $result );
 					}
 				
@@ -476,5 +476,5 @@
 									$result['question'] .= $entries_text;
 									$result['question'] .= $this->functions->lang("Do you want to continue anyway") . "?";
-									return $result;
+									return json_encode( $result );
 								} else {
 									$result['status'] = false;
@@ -482,5 +482,5 @@
 									$result['msg'] .= $this->functions->lang('Field CPF used by') . ":\n";
 									$result['msg'] .= $entries_text;
-									return $result;
+									return json_encode( $result );
 								}								
 									
@@ -494,10 +494,10 @@
 				$result['status'] = false;
 				$result['msg'] = $this->functions->lang('Field CPF must be completed') . '.';
-				return $result;
+				return json_encode( $result );
 			}
 		}
 		//End: Check CPF
 
-		return $result;
+		return json_encode( $result );
 	}
 	
Index: /trunk/expressoAdmin1_2/js/jscode/connector.js
===================================================================
--- /trunk/expressoAdmin1_2/js/jscode/connector.js	(revision 2459)
+++ /trunk/expressoAdmin1_2/js/jscode/connector.js	(revision 2892)
@@ -124,5 +124,5 @@
 	
 							default:
-								showMessage(Element('cc_msg_err_serialize_data_unknown').value);
+								//showMessage(Element('cc_msg_err_serialize_data_unknown').value);
 								break;
 						}
@@ -153,5 +153,5 @@
 	
 				default:
-					showMessage(Element('cc_msg_err_serialize_data_unknown').value);
+					//showMessage(Element('cc_msg_err_serialize_data_unknown').value);
 					return null;
 			}
Index: /trunk/expressoAdmin1_2/js/jscode/expressoadmin.js
===================================================================
--- /trunk/expressoAdmin1_2/js/jscode/expressoadmin.js	(revision 2712)
+++ /trunk/expressoAdmin1_2/js/jscode/expressoadmin.js	(revision 2892)
@@ -55,9 +55,11 @@
 			// Transformar os DN em User Friendly Naming format
 			organization_name = organization_context.split(",");
-			for (i in organization_name) {
-				tmp = organization_name[i].split("=");
-				context += tmp[1];
-				if( i < (organization_name.length - 1) ) context +=  '.';
-			}
+			for (i in organization_name)
+				if ( ! ( i in Object.prototype ) )
+				{
+					tmp = organization_name[i].split("=");
+					context += tmp[1];
+					if( i < (organization_name.length - 1) ) context +=  '.';
+				}
 			if (document.forms[0].associated_domain.value != '')
 			{
@@ -96,8 +98,9 @@
 				organization_name = organization_context.split(",");
 				for (x in organization_name)
-				{
-					tmp = organization_name[x].split("=");
-					context += tmp[1] + '.';
-				}
+					if ( ! ( x in Object.prototype ) )
+					{
+						tmp = organization_name[x].split("=");
+						context += tmp[1] + '.';
+					}
 			}
 		}
Index: /trunk/expressoAdmin1_2/js/jscode/users.js
===================================================================
--- /trunk/expressoAdmin1_2/js/jscode/users.js	(revision 2860)
+++ /trunk/expressoAdmin1_2/js/jscode/users.js	(revision 2892)
@@ -143,4 +143,5 @@
 	var handler_validate_fields = function(data)
 	{
+		data = data.JSON( );
 		if (!data.status)
 		{
@@ -183,5 +184,5 @@
 		}
 	}
-	
+
 	// Needed select all options from select
 	select_user_maillists = document.getElementById('ea_select_user_maillists');
@@ -193,5 +194,8 @@
 	/////////////////////////////////////////////////////////////////////////////////////////////////////////
 	document.getElementById('uid').disabled = false; //Caso o login seja gerado automÃ¡tico, tirar o disabled.
-	cExecute ('$this.ldap_functions.validate_fields&attributes='+attributes, handler_validate_fields);
+	ExpressoLivre.go( {
+		"access" : 'expressoAdmin1_2.ldap_functions.validate_fields&attributes='+attributes,
+		"handler" : handler_validate_fields
+	} );
 }
 
@@ -535,4 +539,5 @@
 		var handler_validate_fields = function(data)
 		{
+			data = data.JSON( );
 			if (!data.status)
 				alert(data.msg);
@@ -542,5 +547,5 @@
 			return;
 		}
-		
+
 		// New uid exist?
 		attrs_array = new Array();
@@ -548,6 +553,9 @@
 		attrs_array['uid'] = new_uid;
 		attributes = connector.serialize(attrs_array);
-	
-		cExecute ('$this.ldap_functions.validate_fields&attributes='+attributes, handler_validate_fields);
+
+		ExpressoLivre.go( {
+			"access" : 'expressoAdmin1_2.ldap_functions.validate_fields&attributes='+attributes,
+			"handler" : handler_validate_fields
+		} );
 	}
 }
