refactor(user): streamline user deletion process and enhance team management logic

This commit is contained in:
Andras Bacsai
2025-06-25 12:14:35 +02:00
parent 7fb85314e5
commit e746e212cb
4 changed files with 105 additions and 66 deletions

View File

@@ -33,6 +33,10 @@ class TeamInvitation extends Model
return true;
} else {
$this->delete();
$user = User::whereEmail($this->email)->first();
if (filled($user)) {
$user->deleteIfNotVerifiedAndForcePasswordReset();
}
return false;
}