diff --git a/plugins/browse/index.php b/plugins/browse/index.php
index 2fb1e020311ad152c75076718c5da967923b2960..c086eea31e73ba26b67ac1dfff63301e5e3b1036 100755
--- a/plugins/browse/index.php
+++ b/plugins/browse/index.php
@@ -17,9 +17,69 @@
     
   
     if (!$sorted)
-	$sorted = 1;
+	$sorted = 0;
    
+if($sorted ==0){  //all users, display alphabatized
+	
+	if($photofilter==1){ //if Applied both condition
+		
+	$allusers = get_data("select a.guid from {$CONFIG->dbprefix}users_entity as a,{$CONFIG->dbprefix}entities as b  where a.guid =b.guid and b.enabled = 'yes'  order by a.name ASC");
+   echo $allusers;
+   	foreach($allusers as $userall) {
+   	
+	$guid = $userall->guid;
+	$entity = get_entity($guid);
+	$one = get_entity_icon_url($entity,$size ='medium');
+
+  if (preg_match("/defaultmedium/",$one)) {
+  
+  } else {
+  	$result .= elgg_view_entity($entity,$fullview);
+  	$countentity[] = $entity;
+  
+         } 
+     }   
+  
+  $count =  sizeof($countentity);
+     $offset =0;
+	 $limit =10;
+    
+	 $nav = elgg_view('navigation/pagination',array(
+												'baseurl' => $baseurl,
+												'offset' => $offset,
+												'count' => $count,
+												'limit' => $limit,
+													));
+       
+ 	}	
+ 
+ 
+ 
+ 
+ else{
+ 	
+ 	function list_entities_sorted($type= "", $subtype = "", $owner_guid = 0, $limit = 10, $fullview = true, $viewtypetoggle = false, $navigation = true,$order_by) {
+		
+		$offset = (int) get_input('offset');
+		$count = get_entities($type, $subtype, $owner_guid,$order_by, $limit, $offset, true);
+		$entities = get_entities($type, $subtype, $owner_guid, $order_by, $limit, $offset);
      
+		return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview, $viewtypetoggle, $navigation);
+		
+	}
+	//name
+	$order_by ="time_updated DESC";
+	//$order_by ="name ASC";
+	$result =   list_entities_sorted('user', $subtype = "", $owner_guid = 0, $limit = 10, $fullview = true, $viewtypetoggle = false, $navigation = true,$order_by); 
+	 
+	 
+	 
+ } 
+	 
+}
+
+
+	
   
 
 
@@ -255,33 +315,35 @@ foreach($allusers as $userall) {
 
 
 
-    $area1  .= "<FORM action=\" \" method=\"post\">";
-    $area1 .= "<br><br><div  style=\"color:;background-color:;\" ><h5>".elgg_echo("browse:bowseuser")."</h5>"; 
-	$area1 .= " <table cellpadding=\"0\" cellspacing=\"0\">
-            <tr>
-                <td>".elgg_echo("browse:sortresult")."</td>
-                <td class=\"browseCheckboxCopy\"> <select name=\"sortresult\" id=\"sortresult\">";
-	
+    $area1  .= "<form action=\" \" method=\"post\" class=\"cool compact\">"; 
+	$area1 .= "<fieldset>
+				<legend>Browse Users</legend>
+				<ol>
+				<li><label class=\"element\">".elgg_echo("browse:sortresult")."</label>
+                <div class=\"element\">
+				<select name=\"sortresult\" id=\"sortresult\">
+				<option value=\"1\">Show only users...</option>";
+				
 	if($sorted == 1){
-		$area1 .=  "<option  value=\"1\"   SELECTED   >".elgg_echo("browse:recently")."</option>";
+		$area1 .=  "<option  value=\"1\"   selected=\"selected\">".elgg_echo("browse:recently")."</option>";
 	}else{
 		$area1 .=  "<option  value=\"1\">".elgg_echo("browse:recently")."</option>";
 	}
 	
 	if($sorted == 2){
-	$area1 .="<option value=\"2\"  SELECTED >".elgg_echo("browse:lastlogin")."</option>";
+	$area1 .="<option value=\"2\"   selected=\"selected\">".elgg_echo("browse:lastlogin")."</option>";
 	}else{
 		$area1 .=  "<option value=\"2\">".elgg_echo("browse:lastlogin")."</option>";
 	}
 	if($sorted == 3){
-	$area1 .=  "<option value=\"3\"  SELECTED >".elgg_echo("browse:newtosite")."</option>";
+	$area1 .=  "<option value=\"3\"   selected=\"selected\">".elgg_echo("browse:newtosite")."</option>";
 	}else{
 		$area1 .=  "<option value=\"3\"   > ".elgg_echo("browse:newtosite")."</option>";
 	}
 	
 	
 	
-	$area1 .= "</select></td></tr>";
+	$area1 .= "</select></div></li></ol></fieldset>";
   
     $area1 .="<tr><br><td><h6>".elgg_echo("browse:photos")."</h6></td></tr>";  
     if($photofilter == 1){