mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 12:07:23 +08:00
misc up
This commit is contained in:
+1
-1
@@ -13,7 +13,7 @@ if (isset($_GET['del']))
|
||||
}
|
||||
}
|
||||
$where=$_GET["type"] ?? '';
|
||||
$refresh = ($CURUSER['sbrefresh'] ? $CURUSER['sbrefresh'] : 120)
|
||||
$refresh = ($CURUSER['sbrefresh'] ?? 120)
|
||||
?>
|
||||
<html><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
|
||||
+10
-2
@@ -10,10 +10,18 @@ if (($CURUSER['id'] != $id && !user_can('viewinvite')) || !is_valid_id($id))
|
||||
$email = unesc(htmlspecialchars(trim($_POST["email"])));
|
||||
if(!empty($_POST['conusr'])) {
|
||||
// sql_query("UPDATE users SET status = 'confirmed', editsecret = '' WHERE id IN (" . implode(", ", $_POST['conusr']) . ") AND status='pending'");
|
||||
\App\Models\User::query()->whereIn('id', $_POST['conusr'])
|
||||
$userList = \App\Models\User::query()->whereIn('id', $_POST['conusr'])
|
||||
->where('status', 'pending')
|
||||
->update(['status' => 'confirmed', 'editsecret' => ''])
|
||||
->get(\App\Models\User::$commonFields)
|
||||
;
|
||||
if ($userList->isNotEmpty()) {
|
||||
$uidArr = [];
|
||||
foreach ($userList as $user) {
|
||||
$uidArr[] = $user->id;
|
||||
fire_event(\App\Enums\ModelEventEnum::USER_UPDATED, $user);
|
||||
}
|
||||
\App\Models\User::query()->whereIn('id', $uidArr)->update(['status' => 'confirmed', 'editsecret' => '']);
|
||||
}
|
||||
} else {
|
||||
stderr($lang_takeconfirm['std_sorry'],$lang_takeconfirm['std_no_buddy_to_confirm'].
|
||||
"<a class=altlink href=invite.php?id={$CURUSER['id']}>".$lang_takeconfirm['std_here_to_go_back'],false);
|
||||
|
||||
@@ -4,7 +4,8 @@ $passkey = $_GET['passkey'] ?? $CURUSER['passkey'] ?? '';
|
||||
if (!$passkey) {
|
||||
die("require passkey");
|
||||
}
|
||||
$cacheKey = "nexus_rss:$passkey:" . md5(http_build_query($_GET));
|
||||
unset($_GET['passkey']);
|
||||
$cacheKey = "nexus_rss:" . md5(http_build_query($_GET));
|
||||
$cacheData = \Nexus\Database\NexusDB::cache_get($cacheKey);
|
||||
if ($cacheData && nexus_env('APP_ENV') != 'local') {
|
||||
do_log("rss get from cache");
|
||||
|
||||
Reference in New Issue
Block a user