Implement change-email, email-verification, account-recovery, and welcome notifications

This commit is contained in:
tomuta
2019-11-24 22:28:49 -07:00
parent c5b7447dac
commit bd1e8be328
33 changed files with 1164 additions and 33 deletions

View File

@@ -1,6 +1,7 @@
use chrono::{NaiveDateTime, Utc};
use super::User;
use crate::CONFIG;
#[derive(Debug, Identifiable, Queryable, Insertable, Associations, AsChangeset)]
#[table_name = "devices"]
@@ -87,7 +88,7 @@ impl Device {
premium: true,
name: user.name.to_string(),
email: user.email.to_string(),
email_verified: true,
email_verified: !CONFIG.mail_enabled() || user.verified_at.is_some(),
orgowner,
orgadmin,