Fix Password reset Timeout
This commit is contained in:
1 parent
1d7ddabb1a
commit
5c37017bd5
1 file changed
+1
-1
@@ -312,7 +312,7 @@ namespace MistoxWebsite.Server.Controllers {
|
|||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<ActionResult<string>> ResetPassword( [FromBody] Account request ) {
|
public async Task<ActionResult<string>> ResetPassword( [FromBody] Account request ) {
|
||||||
try {
|
try {
|
||||||
string key = "p" + request.UserName;
|
string key = "p" + request.Email.ToLower();
|
||||||
// Stop from sending multiple emails quickly
|
// Stop from sending multiple emails quickly
|
||||||
if ( _emailContext._SentEmails.ContainsKey(key) ){
|
if ( _emailContext._SentEmails.ContainsKey(key) ){
|
||||||
DateTime PreviousSentTime = _emailContext._SentEmails.GetValueOrDefault(key);
|
DateTime PreviousSentTime = _emailContext._SentEmails.GetValueOrDefault(key);
|
||||||
|
|||||||
Reference in new issue
Block a user