Skip to content
Snippets Groups Projects
Commit 89bb22fc authored by Robert Anderson's avatar Robert Anderson
Browse files

Check if we have location if we editing a user

parent 990f2d9b
No related branches found
No related tags found
No related merge requests found
...@@ -521,18 +521,22 @@ function updateWiSPUser($params) { ...@@ -521,18 +521,22 @@ function updateWiSPUser($params) {
FirstName = ?, FirstName = ?,
LastName = ?, LastName = ?,
Phone = ?, Phone = ?,
Email = ?, Email = ?
LocationID = ?
WHERE WHERE
UserID = ?", UserID = ?",
array($params[0]['Firstname'], array($params[0]['Firstname'],
$params[0]['Lastname'], $params[0]['Lastname'],
$params[0]['Phone'], $params[0]['Phone'],
$params[0]['Email'], $params[0]['Email'],
$params[0]['LocationID'],
$params[0]['ID']) $params[0]['ID'])
); );
} }
# If successful, add location if any
if ($res !== FALSE && !empty($params[0]['LocationID'])) {
$res = DBDo("UPDATE wisp_userdata SET LocationID = ? WHERE UserID = ?",
array($params[0]['LocationID'],$params[0]['ID'])
);
}
# Commit changes if all was successful, else break # Commit changes if all was successful, else break
if ($res !== FALSE) { if ($res !== FALSE) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment