diff --git a/webui/user-attributes.php b/webui/user-attributes.php
index cc0f0d80b16e430803349c1fe5b802b91fa4ec91..af4935bf25692210e4c79c10b4349da961300f83 100644
--- a/webui/user-attributes.php
+++ b/webui/user-attributes.php
@@ -77,12 +77,22 @@ printHeader(array(
 
 <?php
 
-		$_SESSION['attr_user_id'] = $_POST['user_id']; 
 		if (isset($_POST['user_id'])) {
+			# Set to session for later use
+			$_SESSION['attr_user_id'] = $_POST['user_id']; 
+
+			# Get old attributes
+			$sql = "SELECT 
+						ID, Name, Operator, Value, Disabled 
+					FROM 
+						${DB_TABLE_PREFIX}user_attributes 
+					WHERE 
+						UserID = ".$db->quote($_POST['user_id'])." 
+					ORDER BY 
+						ID
+					";
 
-			$sql = "SELECT ID, Name, Operator, Value, Disabled FROM ${DB_TABLE_PREFIX}user_attributes WHERE UserID = ".$db->quote($_POST['user_id'])." ORDER BY ID";
 			$res = $db->query($sql);
-
 			while ($row = $res->fetchObject()) {
 
 ?>
diff --git a/webui/user-groups.php b/webui/user-groups.php
index 3b67642fef019d53f641cf758ea3eb7c6d1ed8a0..061943d9940b32a54533c2f29700acd75a678951 100644
--- a/webui/user-groups.php
+++ b/webui/user-groups.php
@@ -88,9 +88,7 @@ printHeader(array(
 				$result = $db->query($sql);
 
 				while ($row = $result->fetchObject()) {
-
 ?>
-
 					<tr class="resultsitem">
 						<td><input type="radio" name="group_id" value="<?php echo $row->id; ?>"/></td>
 						<td><?php echo $row->name; ?></td>
@@ -98,43 +96,29 @@ printHeader(array(
 						<td class="textcenter"><?php echo $row->disabled ? 'yes' : 'no'; ?></td>
 						<td><?php echo $row->comment; ?></td>
 					</tr>
-
 <?php
-
 				}
 				$result->closeCursor();
 			}
-
 			if ($res->rowCount() == 0) {
-
 ?>
-
-				<p />
 				<tr>
-					<td colspan="5" class="textcenter">User doesn't belong to any groups</td>
+					<td>User does not belong to any groups</td>
 				</tr>
-
 <?php
-
 			}
 			$res->closeCursor();
 		} else {
-
 ?>
-
-			<div class="warning">Invocation error, no user ID selected</div>
-
+			<tr>
+				<td>Invocation error, no user ID selected</td>
+			</tr>
 <?php
-
 		}
-
 ?>
-
 	</table>
 </form>
-
 <?php
-
  
 printFooter();