mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
more stray queries
This commit is contained in:
parent
95ab503626
commit
dbae29f47d
@ -446,8 +446,9 @@ namespace controller {
|
|||||||
std::vector<Poco::Tuple<int,Poco::DateTime>> results;
|
std::vector<Poco::Tuple<int,Poco::DateTime>> results;
|
||||||
int email_checked = 0;
|
int email_checked = 0;
|
||||||
int resend_count = 1;
|
int resend_count = 1;
|
||||||
select << "select u.id, v.created from users as u "
|
std::string table_name_email_opt_in = "login_email_opt_in";
|
||||||
<< "LEFT JOIN email_opt_in as v ON(u.id = v.user_id) "
|
select << "select u.id, v.created from " << db->getTableName() << " as u "
|
||||||
|
<< "LEFT JOIN " << table_name_email_opt_in << " as v ON(u.id = v.user_id) "
|
||||||
<< "where u.email_checked = ? "
|
<< "where u.email_checked = ? "
|
||||||
<< "AND v.resend_count <= ? "
|
<< "AND v.resend_count <= ? "
|
||||||
<< "ORDER BY u.id, v.created " ,
|
<< "ORDER BY u.id, v.created " ,
|
||||||
@ -525,7 +526,7 @@ namespace controller {
|
|||||||
Poco::Data::Statement select(session);
|
Poco::Data::Statement select(session);
|
||||||
std::vector<Poco::Tuple<int, std::string>> results;
|
std::vector<Poco::Tuple<int, std::string>> results;
|
||||||
|
|
||||||
select << "select id, email from users "
|
select << "select id, email from " << db->getTableName()
|
||||||
<< " where email_hash IS NULL "
|
<< " where email_hash IS NULL "
|
||||||
, Poco::Data::Keywords::into(results)
|
, Poco::Data::Keywords::into(results)
|
||||||
;
|
;
|
||||||
@ -556,7 +557,7 @@ namespace controller {
|
|||||||
// update db
|
// update db
|
||||||
// reuse connection, I hope it's working
|
// reuse connection, I hope it's working
|
||||||
Poco::Data::Statement update(session);
|
Poco::Data::Statement update(session);
|
||||||
update << "UPDATE users set email_hash = ? where id = ?"
|
update << "UPDATE " << db->getTableName() << " set email_hash = ? where id = ?"
|
||||||
, Poco::Data::Keywords::use(updates);
|
, Poco::Data::Keywords::use(updates);
|
||||||
int updated_count = 0;
|
int updated_count = 0;
|
||||||
try {
|
try {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user