mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-08 04:54:32 +00:00
allow user to be deleted if profile is missing
This commit is contained in:
parent
0a7ef89a17
commit
7b54a3ca48
1 changed files with 2 additions and 2 deletions
|
@ -357,7 +357,7 @@ export class DeleteAccountProcessorService {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do this BEFORE deleting the account!
|
// Do this BEFORE deleting the account!
|
||||||
const profile = await this.userProfilesRepository.findOneByOrFail({ userId: user.id });
|
const profile = await this.userProfilesRepository.findOneBy({ userId: user.id });
|
||||||
|
|
||||||
{ // Delete the actual account
|
{ // Delete the actual account
|
||||||
await this.userIpsRepository.delete({
|
await this.userIpsRepository.delete({
|
||||||
|
@ -383,7 +383,7 @@ export class DeleteAccountProcessorService {
|
||||||
}
|
}
|
||||||
|
|
||||||
{ // Send email notification
|
{ // Send email notification
|
||||||
if (profile.email && profile.emailVerified) {
|
if (profile && profile.email && profile.emailVerified) {
|
||||||
try {
|
try {
|
||||||
await this.emailService.sendEmail(profile.email, 'Account deleted',
|
await this.emailService.sendEmail(profile.email, 'Account deleted',
|
||||||
'Your account has been deleted.',
|
'Your account has been deleted.',
|
||||||
|
|
Loading…
Add table
Reference in a new issue