freeso/TSOClient/FSO.Server.Database/DatabaseScripts/changes/0020_email_confirm.sql
Sim a85232a7c4 [API] Registration and Password Reset + SMTP Mailing + misc. admin features (#90)
* [Server] Allow users to be banned from admin API

- Make the API able to ban users and disconnect them.
- Show the INV-150 banned message instead of INV-110 message when a banned user tries to login.

* Forgot ToolRunServer.cs

* [API] SMTP Mailer, misc. admin API features

- Send ingame emails and notify the client.
- Unban users.
- Kick users.
- SMTP Mailer added with optional configuration in config.json. For now it only sends emails asynchronously upon banning a user.

* [Hotfix] Fixes that are hot

- Disable texture compression in cases where it would break on OpenGL 3D
mode and would turn most textures black (monogame issue, may be
re-enabled in future)
- Directional lighting setting is now ignored on minimum lighting.
(fixes black sims, minimum lighting in 3d)
- Fixed key shortcuts for live mode activating when typing. You can now
click or right click on the lot to remove focus from a textbox, letting
you use these commands.
- Skill Gameplay can no longer be disabled for NPCs.
- Audio crashfix for simulation pause.
- Fix newspaper possibly crashing for systems with non-english or
modified date strings.
- Fix an assumption where some systems did not understand "./update.exe"
for launching the updater

* [PIFF] Spotlight patch

- Stops spotlight advertising itself as a table
- Not sure how the original game was fine with this (multiple objects do
the same thing). There must have been some tell to ignore it.

* [API] Began Work on Email Confirmation

- Made optional registration routes for email confirmation.
- Created HTML Mail template files for token sending and
- Created new database table `fso_email_confirm` to store tokens.
- Added new config.json configuration variables.
- Created Database objects for email confirmations.

* [API] Finished Email Confirmation for Registration

- Finished Email Confirmation. Now server admins can choose if they want
  registration to require email confirmation by adding
  `forceEmailConfirmation: true` in config.json

* [API] Implemented Password Reset (w/ Email Confirmation)

- Added password reset handling to API. Usable with or without SMTP enabled.
- When not using SMTP, it asks the user for their old password and if it is correct the password is changed.
- Created necessary Mail templates.

* [API] Added SQL to Manifest, removed forceEmailConfirmation.

If SMTP is enabled and configured, registration will force the use of emails without having to set `forceEmailConfirmation: true`.

* [API] Removed unnecessary routes

Forgot to remove these (they are included in the controllers).
2018-01-29 13:46:59 +00:00

10 lines
No EOL
351 B
SQL

CREATE TABLE `fso_email_confirm` (
`type` ENUM('email','password') NOT NULL DEFAULT 'email',
`email` VARCHAR(50) NULL DEFAULT NULL,
`token` VARCHAR(50) NULL DEFAULT NULL,
`expires` INT(11) NULL DEFAULT NULL
)
COMMENT='Table to control necessary email confirmation for registration or password reset.'
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB
;