liks
This commit is contained in:
@@ -314,7 +314,10 @@ def start_register():
|
||||
select_pending = json.dumps( [dict(ix) for ix in select_pendingRes] )
|
||||
print(select_pending)
|
||||
array3 = json.loads(select_pending)
|
||||
last_row_id = array3['id']
|
||||
|
||||
last_row_id = array3[0]['id']
|
||||
firstname = array3[0]['firstname']
|
||||
email_uid = array3[0]['uid']
|
||||
|
||||
|
||||
# INSERT_MEMBERS = "INSERT INTO members_pending(email,firstname,lastname) VALUES('"+email+"','"+firstname+"','"+lastname+"')"
|
||||
@@ -326,7 +329,7 @@ def start_register():
|
||||
# print('After Insert ::: ')
|
||||
# print(last_row_id)
|
||||
|
||||
send_register_mail(email)
|
||||
send_register_mail(email,email_uid,last_row_id, firstname)
|
||||
return jsonify(pending_user=array3, last_row_id=last_row_id)
|
||||
|
||||
except Exception as e:
|
||||
@@ -336,11 +339,12 @@ def start_register():
|
||||
"data": None
|
||||
}, 500
|
||||
|
||||
def send_register_mail(signup_email):
|
||||
def send_register_mail(signup_email, email_uid,last_row_id,firstname):
|
||||
#panel_url
|
||||
signup_data = {}
|
||||
signup_data["id"] = '23'
|
||||
signup_data["uid"] = 'd8651e10-3279-4858-87da-b52936faa6f0'
|
||||
signup_data["id"] = last_row_id
|
||||
signup_data["uid"] = email_uid
|
||||
#'d8651e10-3279-4858-87da-b52936faa6f0'
|
||||
|
||||
jwt_part = jwt.encode(
|
||||
{"user": signup_data, 'exp' : datetime.datetime.utcnow() + datetime.timedelta(minutes=3330)},
|
||||
@@ -349,7 +353,7 @@ def send_register_mail(signup_email):
|
||||
)
|
||||
link_url= str(panel_url) + '/csignup/' + jwt_part
|
||||
print(link_url)
|
||||
firstname ='Name001'
|
||||
#firstname ='Name001'
|
||||
msg = Message(
|
||||
'verify your MERMS Account',
|
||||
sender ='message@chiefsoft.com',
|
||||
|
||||
Reference in New Issue
Block a user