diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-10-04 13:37:17 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-10-04 13:37:17 +0200 |
commit | 295ed07d40ea330ef438d9cad8fe3af8fd265507 (patch) | |
tree | 0eadabe5ed19e68e2c570cb0fbbb7ba9a20e9863 /Zotlabs/Module | |
parent | fa93114804801bceabea06570e8eee602167600a (diff) | |
download | volse-hubzilla-295ed07d40ea330ef438d9cad8fe3af8fd265507.tar.gz volse-hubzilla-295ed07d40ea330ef438d9cad8fe3af8fd265507.tar.bz2 volse-hubzilla-295ed07d40ea330ef438d9cad8fe3af8fd265507.zip |
bring back notifications for account approvals
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r-- | Zotlabs/Module/Ping.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Zotlabs/Module/Ping.php b/Zotlabs/Module/Ping.php index 1a76f4f7b..66ab1a386 100644 --- a/Zotlabs/Module/Ping.php +++ b/Zotlabs/Module/Ping.php @@ -340,6 +340,30 @@ class Ping extends \Zotlabs\Web\Controller { killme(); } + if((argc() > 1 && (argv(1) === 'register')) && is_site_admin()) { + $result = array(); + + $r = q("SELECT account_email, account_created from account where (account_flags & %d) > 0", + intval(ACCOUNT_PENDING) + ); + if($r) { + foreach($r as $rr) { + $result[] = array( + 'notify_link' => z_root() . '/admin/accounts', + 'name' => $rr['account_email'], + 'url' => '', + 'photo' => get_default_profile_photo(48), + 'when' => relative_date($rr['account_created']), + 'hclass' => ('notify-unseen'), + 'message' => t('requires approval') + ); + } + } + logger('ping (register): ' . print_r($result, true), LOGGER_DATA); + echo json_encode(array('notify' => $result)); + killme(); + } + if(argc() > 1 && (argv(1) === 'all_events')) { $bd_format = t('g A l F d') ; // 8 AM Friday January 18 |