diff options
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) ); |