diff --git a/lib/features/authentication/authentication_view_model.dart b/lib/features/authentication/authentication_view_model.dart index 7e753722..733118ca 100644 --- a/lib/features/authentication/authentication_view_model.dart +++ b/lib/features/authentication/authentication_view_model.dart @@ -641,8 +641,8 @@ class AuthenticationViewModel extends ChangeNotifier { _appState.addUserSwitchPayload(activation.list!.first.toJson(), isSuperUser: true); } } else { - _appState.setSuperUserID = _appState.getAuthenticatedUser()?.patientId; - // _appState.setIsChildLoggedIn = false; + var allUsersPayload = _appState.getUserSwitchPayloads; + _appState.setSuperUserID = allUsersPayload['superUser']?['PatientID']; activation.list!.first.isParentUser = true; _appState.addUserSwitchPayload(activation.list!.first.toJson(), isSuperUser: true); }