Skip to content

Commit af70138

Browse files
committed
add status = N
Signed-off-by: Steve Taylor <[email protected]>
1 parent be378da commit af70138

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ async def forgot_username(payload: ForgotUsernamePayload, background_tasks: Back
547547
raise HTTPException(status_code=status.HTTP_503_SERVICE_UNAVAILABLE, detail="Email service is not configured.")
548548

549549
with engine.connect() as conn:
550-
sql = text("SELECT name FROM dm.dm_user WHERE email = :email LIMIT 1")
550+
sql = text("SELECT name FROM dm.dm_user WHERE email = :email and status = 'N' LIMIT 1")
551551
result = conn.execute(sql, {"email": payload.email}).fetchone()
552552
if result:
553553
username = result[0]
@@ -563,7 +563,7 @@ async def forgot_password(payload: ForgotPasswordPayload, background_tasks: Back
563563
raise HTTPException(status_code=status.HTTP_503_SERVICE_UNAVAILABLE, detail="Email service is not configured.")
564564

565565
with engine.connect() as conn:
566-
sql = text("SELECT email FROM dm.dm_user WHERE name = :username LIMIT 1")
566+
sql = text("SELECT email FROM dm.dm_user WHERE name = :username and status = 'N' LIMIT 1")
567567
result = conn.execute(sql, {"username": payload.username}).fetchone()
568568
if result:
569569
email = result[0]

0 commit comments

Comments
 (0)