mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 00:05:16 +00:00
Check email address
This commit is contained in:
@ -116,6 +116,24 @@ class AccountHelper {
|
||||
}
|
||||
}
|
||||
|
||||
/// Check out whether a given email address exists or not
|
||||
///
|
||||
/// Throws in case of failure
|
||||
static Future<bool> existsMailAccount(String email) async =>
|
||||
(await APIRequest.withoutLogin("account/exists_email")
|
||||
.addString("email", email)
|
||||
.execWithThrow())
|
||||
.getObject()["exists"];
|
||||
|
||||
/// Check out whether security questions have been set for an account or not
|
||||
///
|
||||
/// Throws in case of failure
|
||||
static Future<bool> hasSecurityQuestions(String email) async =>
|
||||
(await APIRequest.withoutLogin("account/has_security_questions")
|
||||
.addString("email", email)
|
||||
.execWithThrow())
|
||||
.getObject()["defined"];
|
||||
|
||||
/// Get current user ID from the server
|
||||
Future<int> _downloadCurrentUserID() async {
|
||||
final response = await APIRequest(
|
||||
|
Reference in New Issue
Block a user