Commit 8c34b5b4 authored by kranthi.kumar's avatar kranthi.kumar

Update login_service.py

parent 5f2d2c09
...@@ -29,10 +29,10 @@ try: ...@@ -29,10 +29,10 @@ try:
# collecting user details from registration.html # collecting user details from registration.html
data = {"Name": request.form["name"], "Phone number": request.form["number"], "Mail id": request.form["mail"], data = {"Name": request.form["name"], "Phone number": request.form["number"], "Mail id": request.form["mail"],
"User Id": request.form["user_id"], "User Id": request.form["user_id"],
"Password": bcrypt.hashpw((request.form["password"]).encode('utf8'), bcrypt.gensalt())} "Password": request.form["password"]}
if request.form["password"] == request.form["r_password"]: if request.form["password"] == request.form["r_password"]:
# sending data to the database. # sending data to the database.
result = mongodb_object.insert(data, request.form["user_id"]) result = mongodb_object.insert(data, request.form["user_id"],request.form["password"])
if result == 1: if result == 1:
# works when user is successfully register # works when user is successfully register
flash("you have successfully register. you can login here :") flash("you have successfully register. you can login here :")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment