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

This commit is contained in:
tomuta committed 2019-11-24 22:28:49 -07:00
1 parent c5b7447dac
commit bd1e8be328
33 files changed
+1164 -33

No files matched your search

+2 -1
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,