mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-14 04:52:00 +00:00
Remove e-mail verification success e-mails (#3124)
This commit is contained in:
parent
becf75d1f9
commit
007c7d5812
2 changed files with 0 additions and 17 deletions
|
@ -3,7 +3,6 @@ use actix_web::web::Data;
|
||||||
use lemmy_api_common::{
|
use lemmy_api_common::{
|
||||||
context::LemmyContext,
|
context::LemmyContext,
|
||||||
person::{VerifyEmail, VerifyEmailResponse},
|
person::{VerifyEmail, VerifyEmailResponse},
|
||||||
utils::send_email_verification_success,
|
|
||||||
};
|
};
|
||||||
use lemmy_db_schema::{
|
use lemmy_db_schema::{
|
||||||
source::{
|
source::{
|
||||||
|
@ -12,7 +11,6 @@ use lemmy_db_schema::{
|
||||||
},
|
},
|
||||||
traits::Crud,
|
traits::Crud,
|
||||||
};
|
};
|
||||||
use lemmy_db_views::structs::LocalUserView;
|
|
||||||
use lemmy_utils::error::LemmyError;
|
use lemmy_utils::error::LemmyError;
|
||||||
|
|
||||||
#[async_trait::async_trait(?Send)]
|
#[async_trait::async_trait(?Send)]
|
||||||
|
@ -35,10 +33,6 @@ impl Perform for VerifyEmail {
|
||||||
|
|
||||||
LocalUser::update(context.pool(), local_user_id, &form).await?;
|
LocalUser::update(context.pool(), local_user_id, &form).await?;
|
||||||
|
|
||||||
let local_user_view = LocalUserView::read(context.pool(), local_user_id).await?;
|
|
||||||
|
|
||||||
send_email_verification_success(&local_user_view, context.settings())?;
|
|
||||||
|
|
||||||
EmailVerification::delete_old_tokens_for_local_user(context.pool(), local_user_id).await?;
|
EmailVerification::delete_old_tokens_for_local_user(context.pool(), local_user_id).await?;
|
||||||
|
|
||||||
Ok(VerifyEmailResponse {})
|
Ok(VerifyEmailResponse {})
|
||||||
|
|
|
@ -403,17 +403,6 @@ pub async fn send_verification_email(
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn send_email_verification_success(
|
|
||||||
user: &LocalUserView,
|
|
||||||
settings: &Settings,
|
|
||||||
) -> Result<(), LemmyError> {
|
|
||||||
let email = &user.local_user.email.clone().expect("email");
|
|
||||||
let lang = get_interface_language(user);
|
|
||||||
let subject = &lang.email_verified_subject(&user.person.actor_id);
|
|
||||||
let body = &lang.email_verified_body();
|
|
||||||
send_email(subject, email, &user.person.name, body, settings)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn get_interface_language(user: &LocalUserView) -> Lang {
|
pub fn get_interface_language(user: &LocalUserView) -> Lang {
|
||||||
lang_str_to_lang(&user.local_user.interface_language)
|
lang_str_to_lang(&user.local_user.interface_language)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue