mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
Show date with year in message to banned users who try to log in
This commit is contained in:
@ -30,7 +30,7 @@ class SessionController < ApplicationController
|
|||||||
if @user.confirm_password?(params[:password])
|
if @user.confirm_password?(params[:password])
|
||||||
|
|
||||||
if @user.is_banned?
|
if @user.is_banned?
|
||||||
render json: { error: I18n.t("login.banned", {date: I18n.l(@user.banned_till, format: :short_no_year)}) }
|
render json: { error: I18n.t("login.banned", {date: I18n.l(@user.banned_till, format: :date_only)}) }
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ en:
|
|||||||
formats:
|
formats:
|
||||||
short: "%m-%d-%Y"
|
short: "%m-%d-%Y"
|
||||||
short_no_year: "%B %-d"
|
short_no_year: "%B %-d"
|
||||||
|
date_only: "%b %-d, %Y"
|
||||||
|
|
||||||
title: "Discourse"
|
title: "Discourse"
|
||||||
topics: "Topics"
|
topics: "Topics"
|
||||||
|
Reference in New Issue
Block a user