1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2025-06-20 08:35:17 +00:00

Can check through the API whether an email address exists or not

This commit is contained in:
2019-12-28 17:05:24 +01:00
parent 506f75f6f1
commit fb96a76e4e
3 changed files with 30 additions and 0 deletions

View File

@ -161,6 +161,20 @@ export class AccountHelper {
};
}
/**
* Check out whether an email address exists or not
*
* @param email Email address to check
*/
public static async ExistsEmail(email: string) : Promise<boolean> {
return await DatabaseHelper.Count({
table: USER_TABLE,
where: {
mail: email
}
}) > 0;
}
/**
* Check out whether a virtual directory is available or not