From 3c23699c13da027f41289827260b6594dc4a4c71 Mon Sep 17 00:00:00 2001
From: Robert Anderson <randerson@lbsd.net>
Date: Thu, 19 Mar 2009 14:34:05 +0000
Subject: [PATCH] Fixed indentation / spelling

---
 webui/user-add.php | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/webui/user-add.php b/webui/user-add.php
index ae3fc7bc..c27a4ad2 100644
--- a/webui/user-add.php
+++ b/webui/user-add.php
@@ -21,12 +21,8 @@ include_once("includes/footer.php");
 include_once("includes/db.php");
 include_once("includes/tooltips.php");
 
-
-
 $db = connect_db();
 
-
-
 printHeader(array(
 		"Tabs" => array(
 			"Back to user list" => "policy-main.php"
@@ -34,11 +30,9 @@ printHeader(array(
 ));
 
 
-
 if ($_POST['frmaction'] == "add") {
 ?>
 	<p class="pageheader">Add user</p>
-
 	<form method="post" action="user-add.php">
 		<div>
 			<input type="hidden" name="frmaction" value="add2" />
@@ -55,27 +49,25 @@ if ($_POST['frmaction'] == "add") {
 			</tr>
 		</table>
 	</form>
-
 <?php
 
 # Check we have all params
 } elseif ($_POST['frmaction'] == "add2") {
 ?>
 	<p class="pageheader">User Add Results</p>
-
 <?php
 	# Check name
 	if (empty($_POST['user_name'])) {
 ?>
 		<div class="warning">Username cannot be empty</div>
 <?php
-
+	# Add to database
 	} else {
 		$stmt = $db->prepare("INSERT INTO ${DB_TABLE_PREFIX}users (Username) VALUES (?)");
-
 		$res = $stmt->execute(array(
-			$_POST['user_name'],
-		));
+				$_POST['user_name'],
+				));
+		# Was it successful?
 		if ($res) {
 ?>
 			<div class="notice">User added</div>
@@ -95,6 +87,5 @@ if ($_POST['frmaction'] == "add") {
 
 printFooter();
 
-
 # vim: ts=4
 ?>
-- 
GitLab