v1.1.27 deactivate customer
This commit is contained in:
@@ -204,12 +204,15 @@ class UserRepository with Logging {
|
||||
Future<void> getUser() async {
|
||||
final User modelUser = this.user;
|
||||
String rc = await FirebaseApi().signInEmail(modelUser.email, modelUser.password);
|
||||
|
||||
if (rc == FirebaseApi.SIGN_IN_OK) {
|
||||
await CustomerApi().getUserByEmail(modelUser.email!);
|
||||
await Cache().afterFirebaseLogin();
|
||||
} else {
|
||||
log("Exception: user not found or password is wrong");
|
||||
try {
|
||||
if (rc == FirebaseApi.SIGN_IN_OK) {
|
||||
await CustomerApi().getUserByEmail(modelUser.email!);
|
||||
await Cache().afterFirebaseLogin();
|
||||
} else {
|
||||
log("Exception: user not found or password is wrong");
|
||||
throw Exception("Customer does not exist or the password is wrong");
|
||||
}
|
||||
} on NotFoundException catch (_) {
|
||||
throw Exception("Customer does not exist or the password is wrong");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user