127.0.0.1:6379> ZRANGE username:uid 0 -1
1) "用戶名1"
2) "用戶名2"
查出用戶名語法,username:uid
有序集合中包含兩個元素:用戶名1
和 用戶名2
。代表這兩個值是在 username:uid
這個有序集合中的用戶名。
不過,並沒有 uid
(即用戶的唯一 ID)對應的數據。如果您需要查看 用戶1
或 用戶2
對應的 uid
,那麼您應該用以下語法。
確認用戶 用戶名1
的 uid
使用 hget
或 ZRANGE
等命令來進一步確定這些用戶的具體信息。
例如,檢查用戶名 用戶1
是否有對應的 uid
。
步驟:
-
查看 username:uid
的 uid
信息:
嘗試查找 用戶1
用戶的 uid
(假設它存儲在其他地方)。
例如,您可以用以下命令來查找與 用戶1
相關的 uid
:
ZSCORE username:uid 用戶1
如果 用戶1
的 uid
是與 用戶1
一樣的分數,這條命令會返回該分數,即該用戶的 uid
。
最後刪除 Redis 中的 lockout:1
鍵,你可以使用 DEL
命令。這樣可以徹底刪除該鍵,從而解除帳戶的鎖定狀態。
請執行以下命令:
DEL lockout:1
如果成功,你將看到返回:
(integer) 1
表示該鍵已經被刪除。如果返回 0
,則表示該鍵並不存在。
驗證刪除結果
你可以再檢查一下該鍵是否已經被刪除:
TTL lockout:1
如果該鍵已被刪除,會返回 -2
,表示該鍵不存在。
小結
- 使用
DEL lockout:1
可以刪除該鎖定鍵。
- 通過
TTL
可以檢查該鍵的存在與否。
鍵對應的中文意思
{
"invalid-data": "無效資料",
"invalid-json": "無效 JSON",
"wrong-parameter-type": "A value of type %3 was expected for property `%1`, but %2 was received instead",
"required-parameters-missing": "Required parameters were missing from this API call: %1",
"not-logged-in": "您還沒有登入。",
"account-locked": "您的帳戶已被暫時鎖定",
"search-requires-login": "搜尋功能僅限成員使用 - 請先登入或者註冊。",
"goback": "按返回以退至前一頁",
"invalid-cid": "無效版面 ID",
"invalid-tid": "無效主題 ID",
"invalid-pid": "無效貼文 ID",
"invalid-uid": "無效使用者 ID",
"invalid-mid": "Invalid Chat Message ID",
"invalid-date": "A valid date must be provided",
"invalid-username": "無效使用者名",
"invalid-email": "無效的電子信箱",
"invalid-fullname": "無效全名",
"invalid-location": "無效位置",
"invalid-birthday": "無效生日",
"invalid-title": "無效的標題",
"invalid-user-data": "無效使用者資料",
"invalid-password": "無效密碼",
"invalid-login-credentials": "無效登入憑證",
"invalid-username-or-password": "請確認使用者名稱和密碼",
"invalid-search-term": "無效的搜尋關鍵字",
"invalid-url": "無效的 URL",
"invalid-event": "Invalid event: %1",
"local-login-disabled": "已停用非管理帳戶的本地登入。",
"csrf-invalid": "可能是由於會話過期,登入失敗。請重試。",
"invalid-path": "Invalid path",
"folder-exists": "Folder exists",
"invalid-pagination-value": "無效的分頁數,必須介於 %1 和 %2 之間",
"username-taken": "此使用者名已被使用",
"email-taken": "Email address is already taken.",
"email-nochange": "The email entered is the same as the email already on file.",
"email-invited": "Email was already invited",
"email-not-confirmed": "Posting in some categories or topics is enabled once your email is confirmed, please click here to send a confirmation email.",
"email-not-confirmed-chat": "您的電子信箱尚未確認,無法聊天,請點擊這裡確認您的電子信箱。",
"email-not-confirmed-email-sent": "Your email has not been confirmed yet, please check your inbox for the confirmation email. You may not be able to post in some categories or chat until your email is confirmed.",
"no-email-to-confirm": "Your account does not have an email set. An email is necessary for account recovery, and may be necessary for chatting and posting in some categories. Please click here to enter an email.",
"user-doesnt-have-email": "User \"%1\" does not have an email set.",
"email-confirm-failed": "我們無法確認您的電子信箱,請重試",
"confirm-email-already-sent": "確認郵件已發出,如需重新發送請等待 %1 分鐘後再試。",
"confirm-email-expired": "Confirmation email expired",
"sendmail-not-found": "無法找到 sendmail 可執行檔,請確保 sendmail 已經安裝並可被運行 NodeBB 的系統帳戶執行",
"digest-not-enabled": "此使用者未開啟摘要通知,或系統設定預設不發送摘要",
"username-too-short": "使用者名太短",
"username-too-long": "使用者名太長",
"password-too-long": "密碼太長",
"reset-rate-limited": "太多密碼重設請求(有頻率限制)",
"reset-same-password": "Please use a password that is different from your current one",
"user-banned": "使用者已停權",
"user-banned-reason": "抱歉,此帳戶已經被停權 (原因:%1)",
"user-banned-reason-until": "抱歉,此帳戶已被停權,直到%1(原因:%2)",
"user-too-new": "抱歉,您需要等待 %1 秒後,才可以發文!",
"blacklisted-ip": "對不起,您的 IP 地址已被社區封鎖。如果您認為這是一個錯誤,請與管理員聯繫。",
"cant-blacklist-self-ip": "You can't blacklist your own IP",
"ban-expiry-missing": "請提供此次停權結束日期",
"no-category": "版面不存在",
"no-topic": "主題不存在",
"no-post": "貼文不存在",
"no-group": "群組不存在",
"no-user": "使用者不存在",
"no-teaser": "主題預覽不存在",
"no-flag": "Flag does not exist",
"no-chat-room": "Chat room does not exist",
"no-privileges": "您的權限不足以執行此操作。",
"category-disabled": "版面已停用",
"topic-locked": "主題已鎖定",
"post-edit-duration-expired": "您只能在發表後 %1 秒內修改內容",
"post-edit-duration-expired-minutes": "您只能在發表後 %1 分鐘內修改內容",
"post-edit-duration-expired-minutes-seconds": "您只能在發表後 %1 分 %2 秒內修改內容",
"post-edit-duration-expired-hours": "您只能在發表後 %1 小時後內修改內容",
"post-edit-duration-expired-hours-minutes": "您只能在發表後 %1 小時 %2 分鐘內修改內容",
"post-edit-duration-expired-days": "您只能在發表後 %1 天內修改內容",
"post-edit-duration-expired-days-hours": "您只能在發表後 %1 天 %2 小時內修改內容",
"post-delete-duration-expired": "您只能在發表後 %1 秒內刪除貼文",
"post-delete-duration-expired-minutes": "您只能在發表後 %1 分鐘內刪除貼文",
"post-delete-duration-expired-minutes-seconds": "您只能在發表發 %1 分 %2 秒內刪除貼文",
"post-delete-duration-expired-hours": "您只能在發表後 %1 小時內刪除貼文",
"post-delete-duration-expired-hours-minutes": "您只能在發表後 %1 小時 %2 分鐘內刪除貼文",
"post-delete-duration-expired-days": "您只能在發表後 %1 天內刪除貼文",
"post-delete-duration-expired-days-hours": "您只能在發表後 %1 天 %2 小時內刪除貼文",
"cant-delete-topic-has-reply": "您不能刪除您的主題,因為已有回覆。",
"cant-delete-topic-has-replies": "您不能刪除您的主題,因為已有 %1 條回覆。",
"content-too-short": "請增加貼文內容,不能少於 %1 個字符。",
"content-too-long": "請刪減貼文內容,不能超過 %1 個字符。",
"title-too-short": "請增加標題,不能少於 %1 個字符。",
"title-too-long": "請刪減標題,不超過 %1 個字符。",
"category-not-selected": "未選擇版面。",
"too-many-posts": "貼文需要間隔 %1 秒以上 - 請稍候再發文",
"too-many-posts-newbie": "因為您是新使用者,所以限制每隔 %1 秒才能發文一次,直到您有 %2 點聲望為止 —— 請稍候再發文",
"too-many-posts-newbie-minutes": "As a new user, you can only post once every %1 minute(s) until you have earned %2 reputation - please wait before posting again",
"already-posting": "You are already posting",
"tag-too-short": "標籤太短,不能少於 %1 個字元",
"tag-too-long": "標籤太長,不能超過 %1 個字元",
"tag-not-allowed": "Tag not allowed",
"not-enough-tags": "沒有足夠的主題標籤。主題必須至少有 %1 個標籤",
"too-many-tags": "過多主題標籤。主題不能超過 %1 個標籤",
"cant-use-system-tag": "You can not use this system tag.",
"cant-remove-system-tag": "You can not remove this system tag.",
"still-uploading": "請等待上傳完成",
"file-too-big": "上傳檔案的大小限制為 %1 KB - 請縮減檔案大小",
"guest-upload-disabled": "訪客不允許上傳",
"cors-error": "由於CORS設定錯誤,無法上傳圖片。",
"upload-ratelimit-reached": "You have uploaded too many files at one time. Please try again later.",
"upload-error-fallback": "Unable to upload image — %1",
"scheduling-to-past": "Please select a date in the future.",
"invalid-schedule-date": "Please enter a valid date and time.",
"cant-pin-scheduled": "Scheduled topics cannot be (un)pinned.",
"cant-merge-scheduled": "Scheduled topics cannot be merged.",
"cant-move-posts-to-scheduled": "Can't move posts to a scheduled topic.",
"cant-move-from-scheduled-to-existing": "Can't move posts from a scheduled topic to an existing topic.",
"already-bookmarked": "您已將此貼文存為了書籤",
"already-unbookmarked": "您已移除了此貼文的書籤",
"cant-ban-other-admins": "您不能封鎖其他管理員!",
"cant-mute-other-admins": "You can't mute other admins!",
"user-muted-for-hours": "You have been muted, you will be able to post in %1 hour(s)",
"user-muted-for-minutes": "You have been muted, you will be able to post in %1 minute(s)",
"cant-make-banned-users-admin": "You can't make banned users admin.",
"cant-remove-last-admin": "您是唯一的管理員。在刪除您的管理員權限前,請增加另一個管理員。",
"account-deletion-disabled": "Account deletion is disabled",
"cant-delete-admin": "在刪除該帳戶之前,請先移除其管理權限。",
"already-deleting": "Already deleting",
"invalid-image": "無效的圖檔",
"invalid-image-type": "無效的圖檔類型。允許的類型有:%1",
"invalid-image-extension": "無效的圖檔副檔名",
"invalid-file-type": "無效檔案格式,允許的格式有:%1",
"invalid-image-dimensions": "圖片尺寸太大",
"group-name-too-short": "群組名太短",
"group-name-too-long": "群組名太長",
"group-already-exists": "群組已存在",
"group-name-change-not-allowed": "不允許更改群組名稱",
"group-already-member": "已經是此群組的成員",
"group-not-member": "不是此群組的成員",
"group-needs-owner": "群組需要指定至少一名群組所有者",
"group-already-invited": "您已邀請該使用者",
"group-already-requested": "已提交您的請求",
"group-join-disabled": "您目前無法加入此群組",
"group-leave-disabled": "您目前無法離開此群組",
"group-user-not-pending": "User does not have a pending request to join this group.",
"gorup-user-not-invited": "User has not been invited to join this group.",
"post-already-deleted": "此貼文已被刪除",
"post-already-restored": "此貼文已經恢復",
"topic-already-deleted": "此主題已被刪除",
"topic-already-restored": "此主題已恢復",
"cant-purge-main-post": "無法清除主貼文,請直接刪除主題",
"topic-thumbnails-are-disabled": "主題縮圖已停用",
"invalid-file": "無效檔案",
"uploads-are-disabled": "上傳已停用",
"signature-too-long": "抱歉,您的簽名不能超過 %1 個字元。",
"about-me-too-long": "抱歉,您的關於我不能超過 %1 個字元。",
"cant-chat-with-yourself": "您不能和自己聊天!",
"chat-restricted": "此使用者限制了他的聊天訊息。必須他先追隨您,您才能和他聊天。",
"chat-user-blocked": "You have been blocked by this user.",
"chat-disabled": "聊天系統已關閉",
"too-many-messages": "您發送了太多訊息,請稍等片刻。",
"invalid-chat-message": "無效的聊天訊息",
"chat-message-too-long": "聊天訊息不能超過 %1 個字元。",
"cant-edit-chat-message": "您不能編輯這條訊息",
"cant-delete-chat-message": "您不允許刪除這條訊息",
"chat-edit-duration-expired": "您只能在發佈 %1 秒後修改聊天訊息",
"chat-delete-duration-expired": "您只能在發佈 %1 秒後刪除聊天訊息",
"chat-deleted-already": "聊天訊息已經被刪除",
"chat-restored-already": "此聊天訊息已經恢復。",
"chat-room-does-not-exist": "Chat room does not exist.",
"cant-add-users-to-chat-room": "Can't add users to chat room.",
"cant-remove-users-from-chat-room": "Can't remove users from chat room.",
"chat-room-name-too-long": "Chat room name too long. Names can't be longer than %1 characters.",
"already-voting-for-this-post": "您已讚過此貼文回覆了。",
"reputation-system-disabled": "聲望系統已停用。",
"downvoting-disabled": "倒讚已被停用",
"not-enough-reputation-to-chat": "You need %1 reputation to chat",
"not-enough-reputation-to-upvote": "You need %1 reputation to upvote",
"not-enough-reputation-to-downvote": "You need %1 reputation to downvote",
"not-enough-reputation-to-post-links": "You need %1 reputation to post links",
"not-enough-reputation-to-flag": "You need %1 reputation to flag this post",
"not-enough-reputation-min-rep-website": "You need %1 reputation to add a website",
"not-enough-reputation-min-rep-aboutme": "You need %1 reputation to add an about me",
"not-enough-reputation-min-rep-signature": "You need %1 reputation to add a signature",
參考網站:
https://ddp.life/topic/43/nodebb-您的帐号已被临时锁定