From 990f2d9b9ea9f64285374a24864d396d0cfdaad3 Mon Sep 17 00:00:00 2001
From: Robert Anderson <randerson@lbsd.net>
Date: Wed, 15 Jul 2009 14:03:31 +0000
Subject: [PATCH] LocationID uses !empty instead of isset since "" strings are
 being passed

---
 webgui/include/ajax/functions/WiSPUsers.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webgui/include/ajax/functions/WiSPUsers.php b/webgui/include/ajax/functions/WiSPUsers.php
index 73af4638..7eae446f 100644
--- a/webgui/include/ajax/functions/WiSPUsers.php
+++ b/webgui/include/ajax/functions/WiSPUsers.php
@@ -245,7 +245,7 @@ function createWiSPUser($params) {
 		if ($res !== FALSE && isset($params[0]['Email'])) {
 			$res = DBDo("UPDATE wisp_userdata SET Email = ? WHERE UserID = ?",array($params[0]['Email'],$userID));
 		}
-		if ($res !== FALSE && isset($params[0]['LocationID'])) {
+		if ($res !== FALSE && !empty($params[0]['LocationID'])) {
 			$res = DBDo("UPDATE wisp_userdata SET LocationID = ? WHERE UserID = ?",array($params[0]['LocationID'],$userID));
 		}
 
-- 
GitLab