This repository has been archived on 2024-08-28. You can view files and clone it, but cannot push or open issues or pull requests.
satori-services/public/recent-registrations.php

22 lines
566 B
PHP

<?php
require_once '_flashii.php';
$startId = (int)filter_input(INPUT_GET, 'start', FILTER_SANITIZE_NUMBER_INT);
try {
$fetch = $db->prepare('
SELECT `user_id`, `username`
FROM `msz_users`
WHERE `user_id` > :user_id
AND `user_created` > NOW() - INTERVAL 7 DAY
ORDER BY `user_id`
LIMIT 10
');
$fetch->bindValue('user_id', $startId);
if($fetch->execute())
echo json_encode($fetch->fetchAll(PDO::FETCH_ASSOC));
else
echo '[]';
} catch(PDOException $ex) {
echo '{"error":104}';
}