mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 20:43:44 +02:00
formatting
This commit is contained in:
parent
bf4bb414dd
commit
6d8c96b89f
1 changed files with 7 additions and 2 deletions
|
@ -290,7 +290,9 @@ void PostgreSQL::updateMemberOnLoad(const uint64_t networkId, const uint64_t mem
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *params[1] = { nwids };
|
const char *params[1] = { nwids };
|
||||||
PGresult *res = PQexecParams(conn, "SELECT org.client_id, org.authorization_endpoint FROM ztc_network AS nw, ztc_org AS org WHERE nw.id = $1 AND nw.sso_enabled = true AND org.owner_id = nw.owner_id",
|
PGresult *res = PQexecParams(conn, "SELECT org.client_id, org.authorization_endpoint "
|
||||||
|
"FROM ztc_network AS nw, ztc_org AS org "
|
||||||
|
"WHERE nw.id = $1 AND nw.sso_enabled = true AND org.owner_id = nw.owner_id",
|
||||||
1,
|
1,
|
||||||
NULL,
|
NULL,
|
||||||
params,
|
params,
|
||||||
|
@ -309,7 +311,10 @@ void PostgreSQL::updateMemberOnLoad(const uint64_t networkId, const uint64_t mem
|
||||||
PQclear(res);
|
PQclear(res);
|
||||||
if ((!client_id.empty())&&(!authorization_endpoint.empty())) {
|
if ((!client_id.empty())&&(!authorization_endpoint.empty())) {
|
||||||
const char *params2[2] = { nwids, ids };
|
const char *params2[2] = { nwids, ids };
|
||||||
res = PQexecParams(conn, "SELECT e.nonce, e.authentication_expiry_time FROM ztc_sso_expiry AS e WHERE e.network_id = $1 AND e.member_id = $2 ORDER BY n.authentication_expiry_time DESC LIMIT 1",
|
res = PQexecParams(conn, "SELECT e.nonce, e.authentication_expiry_time "
|
||||||
|
"FROM ztc_sso_expiry AS e "
|
||||||
|
"WHERE e.network_id = $1 AND e.member_id = $2 "
|
||||||
|
"ORDER BY n.authentication_expiry_time DESC LIMIT 1",
|
||||||
1,
|
1,
|
||||||
NULL,
|
NULL,
|
||||||
params2,
|
params2,
|
||||||
|
|
Loading…
Add table
Reference in a new issue