function to send a password reset email
This commit is contained in:
@ -236,6 +236,15 @@ namespace Utilities {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Sends a Password Reset Email
|
||||||
|
* return 0 at success, 1 at client fail, 2 at critical fail.
|
||||||
|
*/
|
||||||
|
int sendPasswordResetEmail(const config& configuration, const std::string& email, const std::string& passwordResetKey) {
|
||||||
|
std::string emailContent = EmailTemplateCollection::passwordResetEmail(configuration.domain, email, passwordResetKey);
|
||||||
|
return sendEmail(configuration, email, EmailTemplateCollection::PASSWORD_RESET_EMAIL_SUBJECT, emailContent);
|
||||||
|
}
|
||||||
|
|
||||||
std::string createHashSha512(const std::string& str){
|
std::string createHashSha512(const std::string& str){
|
||||||
unsigned char hash[SHA512_DIGEST_LENGTH];
|
unsigned char hash[SHA512_DIGEST_LENGTH];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user