Commits

christiansalazar committed 6d4aa21

permite especificar separador a getUserDescription. quita texto feo nohay_

Comments (0)

Files changed (1)

models/data/CrugeStoredUser.php

 		return null;
 	}
 
-	public function getUserDescription($boolLoadUserFields=false){
+	public function getUserDescription($boolLoadUserFields=false, $sep=','){
 		$fieldNames = CrugeUtil::config()->userDescriptionFieldsArray;
 		$tmp = "";
 		if(in_array("username",$fieldNames))
-			$tmp .= ",".$this->username;
+			$tmp .= $sep.$this->username;
 		if(in_array("email",$fieldNames))
-			$tmp .= ",".$this->email;
+			$tmp .= $sep.$this->email;
 		if($fieldNames != null){
 			if($boolLoadUserFields == true)
 				$this->setFields(
 					CrugeFactory::get()->getICrugeFieldListModels($this));
 			foreach($fieldNames as $fname)
 			if(($fname != "username") && ($fname != "email")){
-				$tmp .= ",".$this->getCustomFieldValue($fname,"nohay_".$fname);
+				$tmp .= $sep.$this->getCustomFieldValue($fname,$fname);
 			}
 		}
 		if($tmp == "")
 			$tmp = $this->getUsername();
-		return ltrim($tmp,", ");
+		return ltrim($tmp,$sep." ");
 	}
 
     /* es un loadModel de uso multiple. $modo puede ser: 'iduser','username' o 'email' para