summaryrefslogtreecommitdiff
path: root/controller/PostgreSQL.cpp
diff options
context:
space:
mode:
authorGrant Limberg <[email protected]>2021-09-01 12:24:57 -0700
committerGrant Limberg <[email protected]>2021-09-02 11:24:04 -0700
commita2ffe8c05efdc6c783149faaa72a7004605c7a99 (patch)
treec4dd0a8a0203bb7b30970d5ed0c78dc80f5423a9 /controller/PostgreSQL.cpp
parente1af003e4f8e06586c6759e8d8f68b655d5f6dbe (diff)
dont generate nonce for deleted members
Diffstat (limited to 'controller/PostgreSQL.cpp')
-rw-r--r--controller/PostgreSQL.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/controller/PostgreSQL.cpp b/controller/PostgreSQL.cpp
index 64b0767b..5d48ce1f 100644
--- a/controller/PostgreSQL.cpp
+++ b/controller/PostgreSQL.cpp
@@ -357,7 +357,7 @@ std::string PostgreSQL::getSSOAuthURL(const nlohmann::json &member, const std::s
std::string nonce = "";
// check if the member exists first.
- pqxx::row count = w.exec_params1("SELECT count(id) FROM ztc_member WHERE id = $1 AND network_id = $2", memberId, networkId);
+ pqxx::row count = w.exec_params1("SELECT count(id) FROM ztc_member WHERE id = $1 AND network_id = $2 AND deleted = false", memberId, networkId);
if (count[0].as<int>() == 1) {
// find an unused nonce, if one exists.
pqxx::result r = w.exec_params("SELECT nonce FROM ztc_sso_expiry "