Source

cruge / models / data / CrugeStoredUser.php

Diff from to

models/data/CrugeStoredUser.php

 		return null;
 	}
 
-	public function getUserDescription(){
+	public function getUserDescription($boolLoadUserFields=false){
 		$fieldNames = CrugeUtil::config()->userDescriptionFieldsArray;
 		$tmp = "";
 		if(in_array("username",$fieldNames))
 			$tmp .= ",".$this->username;
 		if(in_array("email",$fieldNames))
 			$tmp .= ",".$this->email;
-		if($fieldNames != null)
-		foreach($fieldNames as $fname)
-			if(($fname != "username") && ($fname != "email"))
-			$tmp .= ",".$this->getCustomFieldValue($fname,"nohay_".$fname);
+		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);
+			}
+		}
 		if($tmp == "")
 			$tmp = $this->getUsername();
 		return ltrim($tmp,", ");