From e2be110decdf4bf14730df767ae221e52d0b9605 Mon Sep 17 00:00:00 2001 From: nilsreichardt Date: Tue, 11 Jun 2024 22:32:28 +0200 Subject: [PATCH] Skip for password null check for anonymous users --- .../src/subpages/my_profile/my_profile_page.dart | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/lib/settings/src/subpages/my_profile/my_profile_page.dart b/app/lib/settings/src/subpages/my_profile/my_profile_page.dart index 10cabd420..b88a0527f 100644 --- a/app/lib/settings/src/subpages/my_profile/my_profile_page.dart +++ b/app/lib/settings/src/subpages/my_profile/my_profile_page.dart @@ -409,15 +409,17 @@ class _DeleteAccountDialogContentState ]; Future tryToDeleteUser(BuildContext context) async { - if (isEmptyOrNull(password)) { - return; - } - final api = BlocProvider.of(context).api; - final analytics = BlocProvider.of(context).analytics; final authUser = api.user.authUser!; final fbUser = authUser.firebaseUser; final provider = authUser.provider; + if (provider != Provider.anonymous) { + if (isEmptyOrNull(password)) { + return; + } + } + + final analytics = BlocProvider.of(context).analytics; setState(() { isLoading = true;