diff options
-rw-r--r-- | Zotlabs/Lib/Enotify.php | 2 | ||||
-rw-r--r-- | include/account.php | 17 | ||||
-rw-r--r-- | view/tpl/admin_accounts.tpl | 2 |
3 files changed, 14 insertions, 7 deletions
diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php index b64ab2cc5..992eba000 100644 --- a/Zotlabs/Lib/Enotify.php +++ b/Zotlabs/Lib/Enotify.php @@ -983,7 +983,7 @@ class Enotify { 'photo' => z_root() . '/' . get_default_profile_photo(48), 'when' => datetime_convert('UTC', date_default_timezone_get(),$rr['reg_created']), 'hclass' => ('notify-unseen'), - 'message' => (($rr['reg_vfd'] === '× not yet') ? t('not yet verified') : t('verified')) . ', ' . t('requires approval') + 'message' => (($rr['reg_vfd']) ? t('verified') : t('not yet verified')) . ', ' . t('requires approval') ]; return $x; 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) ); diff --git a/view/tpl/admin_accounts.tpl b/view/tpl/admin_accounts.tpl index 8d6506184..444905fc7 100644 --- a/view/tpl/admin_accounts.tpl +++ b/view/tpl/admin_accounts.tpl @@ -21,7 +21,7 @@ <td class="created">{{$u.reg_created}}<br>{{$u.reg_n}} {{if $u.reg_expires < $now}} ★EXPIRED★{{/if}}</td> <td class="created">{{$u.reg_startup}}<br>{{$u.reg_expires}}</td> - <td class="email">{{$u.reg_did2}}<br>{{$u.reg_vfd}}</td> + <td class="email">{{$u.reg_did2}}<br>{{if $u.reg_vfd}}verified{{else}}not yet verified{{/if}}</td> <td class="email">{{$u.reg_email}}<br>{{$u.reg_atip}}</td> <td class="checkbox_bulkedit"><input type="checkbox" class="pending_ckbx" id="id_pending_{{$n}}" name="pending[]" value="{{$n}}"></td> <td class="tools"> |