aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Admin/Accounts.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Module/Admin/Accounts.php')
-rw-r--r--Zotlabs/Module/Admin/Accounts.php37
1 files changed, 22 insertions, 15 deletions
diff --git a/Zotlabs/Module/Admin/Accounts.php b/Zotlabs/Module/Admin/Accounts.php
index ac46c43aa..76d332268 100644
--- a/Zotlabs/Module/Admin/Accounts.php
+++ b/Zotlabs/Module/Admin/Accounts.php
@@ -206,28 +206,34 @@ class Accounts {
$tao = 'tao.zar.zarax = ' . "'" . '<img src="' . z_root() . '/images/zapax16.gif">' . "';\n";
- $pending = get_pending_accounts();
+
+ // by default we will only return verified results. if reg_all is set we will return everything''
+ $get_all = isset($_REQUEST['get_all']);
+ $pending = get_pending_accounts($get_all);
unset($_SESSION[self::MYP]);
+
if ($pending) {
// collect and group all ip
- $atips = q("SELECT reg_atip AS atip, COUNT(reg_atip) AS atips FROM register "
- ." WHERE reg_vital = 1 GROUP BY reg_atip ");
- $atips ? $atipn = array_column($atips, 'atips', 'atip') : $atipn = array('' => 0);
+ $atips = dbq("SELECT reg_atip AS atip, COUNT(reg_atip) AS atips FROM register
+ WHERE reg_vital = 1 GROUP BY reg_atip"
+ );
+
+ (($atips) ? $atipn = array_column($atips, 'atips', 'atip') : $atipn = ['' => 0]);
$tao .= 'tao.zar.zarar = {';
foreach ($pending as $n => $v) {
- if (array_key_exists($v['reg_atip'], $atipn)) {
- $pending[$n]['reg_atip'] = $v['reg_atip'] . ' ◄' . $atipn[ $v['reg_atip'] ] . '×';
- }
+ $stuff = json_decode($v['reg_stuff'], true);
- $pending[$n]['status'] = t('Not verified');
- if($pending[$n]['reg_vfd'])
- $pending[$n]['status'] = t('Verified');
+ if(isset($stuff['msg'])) {
+ $pending[$n]['msg'] = $stuff['msg'];
+ }
- if(!$pending[$n]['reg_vfd'] && $pending[$n]['reg_expires'] < datetime_convert())
- $pending[$n]['status'] = t('Expired');
+ if (array_key_exists($v['reg_atip'], $atipn)) {
+ $pending[$n]['reg_atip'] = $v['reg_atip'];
+ $pending[$n]['reg_atip_n'] = $atipn[$v['reg_atip']];
+ }
// timezone adjust date_time for display
$pending[$n]['reg_created'] = datetime_convert('UTC', date_default_timezone_get(), $pending[$n]['reg_created']);
@@ -298,9 +304,9 @@ class Accounts {
'$sel_tall' => t('Select toggle'),
'$sel_deny' => t('Deny selected'),
'$sel_aprv' => t('Approve selected'),
- '$h_pending' => t('Registrations waiting for confirm'),
- '$th_pending' => array( t('Request date'), t('Verification status'), t('Timeframe'), 'dId2', t('specified,atip') ),
- '$no_pending' => t('No registrations.'),
+ '$h_pending' => t('Verified registrations waiting for approval'),
+ '$th_pending' => array(t('Request date'), 'dId2', t('Email'), 'IP', t('Requests')),
+ '$no_pending' => t('No verified registrations.'),
'$approve' => t('Approve'),
'$deny' => t('Deny'),
'$delete' => t('Delete'),
@@ -330,6 +336,7 @@ class Accounts {
'$tao' => $tao,
'$pending' => $pending,
'$users' => $users,
+ '$msg' => t('Message')
));
$o .= paginate($a);