From 3b09eb9e89694ccbd9d22a1dd91a4811e870b1e2 Mon Sep 17 00:00:00 2001
From: Falko Timme <ft@falkotimme.com>
Date: Thu, 22 Jan 2015 05:45:09 -0500
Subject: [PATCH] - moved SQL query into if container.

---
 interface/web/sites/webdav_user_edit.php |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/interface/web/sites/webdav_user_edit.php b/interface/web/sites/webdav_user_edit.php
index 46daaca..6800525 100644
--- a/interface/web/sites/webdav_user_edit.php
+++ b/interface/web/sites/webdav_user_edit.php
@@ -185,9 +185,9 @@
 		if ((isset($this->dataRecord["password"])) && ($this->dataRecord["password"] != '') && ($this->dataRecord["password"] != $this->dataRecord['passwordOld'])) {
 			$hash = md5($this->dataRecord["username"] . ':' . $this->dataRecord["dir"] . ':' . $this->dataRecord["password"]);
 			$this->dataRecord["password"] = $hash;
+			$app->db->query("UPDATE webdav_user SET password = '".$this->dataRecord["password"]."' WHERE webdav_user_id = ".$this->id);
 		}
 		
-		$app->db->query("UPDATE webdav_user SET password = '".$this->dataRecord["password"]."' WHERE webdav_user_id = ".$this->id);
 	}
 
 }

--
Gitblit v1.9.1