mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 19:08:10 -05:00
commit
fe6a80d37b
3 changed files with 13 additions and 0 deletions
|
@ -232,6 +232,10 @@ class UsersController < ApplicationController
|
||||||
return fail_with("login.password_too_long")
|
return fail_with("login.password_too_long")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if params[:email] && params[:email].length > 254 + 1 + 253
|
||||||
|
return fail_with("login.email_too_long")
|
||||||
|
end
|
||||||
|
|
||||||
if SiteSetting.reserved_usernames.split("|").include? params[:username].downcase
|
if SiteSetting.reserved_usernames.split("|").include? params[:username].downcase
|
||||||
return fail_with("login.reserved_username")
|
return fail_with("login.reserved_username")
|
||||||
end
|
end
|
||||||
|
|
|
@ -1302,6 +1302,7 @@ en:
|
||||||
omniauth_error_unknown: "Something went wrong processing your log in, please try again."
|
omniauth_error_unknown: "Something went wrong processing your log in, please try again."
|
||||||
new_registrations_disabled: "New account registrations are not allowed at this time."
|
new_registrations_disabled: "New account registrations are not allowed at this time."
|
||||||
password_too_long: "Passwords are limited to 200 characters."
|
password_too_long: "Passwords are limited to 200 characters."
|
||||||
|
email_too_long: "The email you provided is too long. Mailbox names must be no more than 254 characters, and domain names must be no more than 253 characters."
|
||||||
reserved_username: "That username is not allowed."
|
reserved_username: "That username is not allowed."
|
||||||
missing_user_field: "You have not completed all the user fields"
|
missing_user_field: "You have not completed all the user fields"
|
||||||
close_window: "Authentication is complete. Close this window to continue."
|
close_window: "Authentication is complete. Close this window to continue."
|
||||||
|
|
8
db/migrate/20150713203955_enlarge_users_email_field.rb
Normal file
8
db/migrate/20150713203955_enlarge_users_email_field.rb
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
class EnlargeUsersEmailField < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
change_column :users, :email, :string, :limit => 513
|
||||||
|
end
|
||||||
|
def down
|
||||||
|
change_column :users, :email, :string, :limit => 128
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue