mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 04:08:41 +08:00
SECURITY: Support for confirm old as well as new email accounts
This commit is contained in:
15
db/migrate/20160307190919_create_email_change_requests.rb
Normal file
15
db/migrate/20160307190919_create_email_change_requests.rb
Normal file
@ -0,0 +1,15 @@
|
||||
class CreateEmailChangeRequests < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :email_change_requests do |t|
|
||||
t.integer :user_id, null: false
|
||||
t.string :old_email, length: 513, null: false
|
||||
t.string :new_email, length: 513, null: false
|
||||
t.integer :old_email_token_id, null: true
|
||||
t.integer :new_email_token_id, null: true
|
||||
t.integer :change_state, null: false
|
||||
t.timestamps null: false
|
||||
end
|
||||
|
||||
add_index :email_change_requests, :user_id
|
||||
end
|
||||
end
|
@ -0,0 +1,8 @@
|
||||
class RenameConfirmTranslationKey < ActiveRecord::Migration
|
||||
def change
|
||||
execute "UPDATE translation_overrides SET translation_key = 'user_notifications.confirm_new_email.subject_template'
|
||||
WHERE translation_key = 'user_notifications.authorize_email.subject_template'"
|
||||
execute "UPDATE translation_overrides SET translation_key = 'user_notifications.confirm_new_email.text_body_template'
|
||||
WHERE translation_key = 'user_notifications.authorize_email.text_body_template'"
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user