From 17ceb974fff8c7b7c21703d69a9af8d2a47c65bb Mon Sep 17 00:00:00 2001 From: Braeden Sowinski Date: Fri, 14 Jan 2022 22:54:45 -0800 Subject: [PATCH] update/set-login-block --- controllers/authController.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/controllers/authController.go b/controllers/authController.go index 52e858b..5abc58c 100644 --- a/controllers/authController.go +++ b/controllers/authController.go @@ -97,11 +97,16 @@ func Enroll(c *fiber.Ctx) error { student.SchoolEmail = student.GenerateSchoolEmail() + // Disable login block + student.AccountDisabled = false + student.Attempts = 0 + + // Generate temporary password tempPass := student.GeneratePassword(12, 1, 1, 1) student.Password = student.HashPassword(tempPass) student.TempPassword = true - // Send student personal email temp password + // Send student personal email temp password smtpHost := "smpt.gmail.com" smtpPort := "587"