diff --git a/backend/main.go b/backend/main.go index f24046b..1480c94 100644 --- a/backend/main.go +++ b/backend/main.go @@ -129,7 +129,7 @@ func register(res http.ResponseWriter, req *http.Request) { // Generate username from institute email userEmail := jwtValidateResp.Email - username := strings.TrimSuffix(userEmail, "@kgpian.iitkgp.ac.in") + username := strings.Split(userEmail, "@")[0] // Check if user already exists or not rowD := db.QueryRow(`SELECT id FROM user WHERE user=?`, username)