本文整理匯總了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