本文整理汇总了PHP中BuckysUser::searchUsers方法的典型用法代码示例。如果您正苦于以下问题:PHP BuckysUser::searchUsers方法的具体用法?PHP BuckysUser::searchUsers怎么用?PHP BuckysUser::searchUsers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BuckysUser
的用法示例。
在下文中一共展示了BuckysUser::searchUsers方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirname
<?php
require dirname(__FILE__) . '/includes/bootstrap.php';
//Getting Current User ID
if (!buckys_check_user_acl(USER_ACL_REGISTERED)) {
buckys_redirect('/index.php', MSG_PERMISSION_DENIED, MSG_TYPE_ERROR);
}
if (isset($_POST['action']) && $_POST['action'] == 'get-users') {
$users = BuckysUser::searchUsers($_REQUEST['term'], $userID);
$result = [];
foreach ($users as $row) {
$result[] = ["id" => $row['userID'], 'label' => $row['fullName'], 'value' => $row['fullName'], 'hash' => buckys_encrypt_id($row['userID'])];
}
echo json_encode($result);
buckys_exit();
}
if (isset($_POST['action']) && $_POST['action'] == 'send-money') {
if (!isset($_POST['receiverID']) || !isset($_POST['receiverIDHash']) || !isset($_POST['amount']) || !buckys_check_id_encrypted($_POST['receiverID'], $_POST['receiverIDHash'])) {
buckys_redirect('/credits.php', MSG_INVALID_REQUEST, MSG_TYPE_ERROR);
}
$result = BuckysTransaction::sendCredits($_POST['receiverID'], $_POST['amount']);
if ($result === true) {
buckys_redirect('/credits.php', MSG_SENT_CREDITS_SUCCESSFULLY);
} else {
buckys_redirect('/credits.php', $result, MSG_TYPE_ERROR);
}
exit;
}
$page = isset($_GET['page']) ? $_GET['page'] : 1;
$totalCount = BuckysTransaction::getNumOfCreditActivities($userID);
//Init Pagination Class