diff options
author | Mario <mario@mariovavti.com> | 2021-03-16 12:32:20 +0100 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-03-16 12:32:20 +0100 |
commit | c658bbca2416bc1d3e51ef6072fea57151d40981 (patch) | |
tree | b32c1f0c209fc03654082a2be025d3ce7ca39815 /include | |
parent | 4e921cfdcfd6f021081a955855ecbafb1f30ec48 (diff) | |
download | volse-hubzilla-c658bbca2416bc1d3e51ef6072fea57151d40981.tar.gz volse-hubzilla-c658bbca2416bc1d3e51ef6072fea57151d40981.tar.bz2 volse-hubzilla-c658bbca2416bc1d3e51ef6072fea57151d40981.zip |
simplify get_pending_accounts query so that it will work in postgres. this will introduce a regression in rendering the table background color.
Diffstat (limited to 'include')
-rw-r--r-- | include/account.php | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/include/account.php b/include/account.php index b928a603e..1c66e1992 100644 --- a/include/account.php +++ b/include/account.php @@ -1256,11 +1256,18 @@ function zar_register_dutystate( $now=NULL, $day=NULL ) { } function get_pending_accounts() { - $r = q("SELECT @i:=@i+1 AS reg_n, @i MOD 2 AS reg_z, " - ." reg_did2, reg_created, reg_startup, reg_expires, reg_email, reg_atip, reg_hash, reg_id, " - ." CASE (reg_flags & %d) WHEN 0 THEN '✔ verified' WHEN 1 THEN '× not yet' END AS reg_vfd " - ." FROM register, (SELECT @i:=0) AS i " - ." WHERE reg_vital = 1 AND (reg_flags & %d) >= 0 ", + + /* get pending */ + // [hilmar -> + //~ $r = q("SELECT account.*, reg_hash FROM account LEFT JOIN register ON account_id = reg_uid WHERE reg_vital = 1 AND (account_flags & %d) > 0", + //~ intval(ACCOUNT_PENDING) + //~ ); + + // better useability at the moment to tell all (ACCOUNT_PENDING >= 0) instead of (> 0 for those need approval) + + $r = q("SELECT reg_did2, reg_created, reg_startup, reg_expires, reg_email, reg_atip, reg_hash, reg_id, + CASE (reg_flags & %d) WHEN 0 THEN 1 WHEN 1 THEN 0 END AS reg_vfd + FROM register WHERE reg_vital = 1 AND (reg_flags & %d) >= 0", intval(ACCOUNT_UNVERIFIED), intval(ACCOUNT_PENDING) ); |