Fixing a false table name and uncompleted variable calling on procedure
This commit is contained in:
parent
2f4b9fb1a3
commit
37c39437c9
@ -19,10 +19,8 @@ class validation():
|
||||
result_profile = self.cursor.fetchone()
|
||||
self.cursor.execute("SELECT COUNT(*) AS `count` FROM auth_profile WHERE username = %s ; ", (username,) )
|
||||
result_username = self.cursor.fetchone()
|
||||
self.cursor.execute(f"SELECT COUNT(*) AS `count` FROM auth_profile_verification INNER JOIN auth_profile ON auth_profile.id = auth_profile_verification.auth_profile WHERE auth_profile.email = %s AND auth_profile_verification.type = 'email' AND auth_profile_verification.verified = 0 ; ", (email,) )
|
||||
self.cursor.execute(f"SELECT COUNT(*) AS `count` FROM auth_profile_verification INNER JOIN auth_profile ON auth_profile.id = auth_profile_verification.profile WHERE auth_profile.email = %s AND auth_profile_verification.type = 'email' AND auth_profile_verification.verified = 0 ; ", (email,) )
|
||||
result_unverified = self.cursor.fetchone()
|
||||
self.cursor.execute(f"SELECT id, name FROM `auth_roles` WHERE auth_roles.name = %s ; ", (roles,) )
|
||||
result_roles = self.cursor.fetchone()
|
||||
loggorilla.prcss(APIADDR, "Validating")
|
||||
if score < 0.2:
|
||||
response["status" ] = "failed"
|
||||
@ -120,7 +118,7 @@ class validation():
|
||||
}
|
||||
else:
|
||||
session_not_found = False
|
||||
cursor.execute(f"SELECT COUNT(*) AS `count`, auth_profile.* FROM auth_profile_verification LEFT JOIN auth_profile ON auth_profile.id = auth_profile_verification.auth_profile WHERE auth_profile.token = %s AND auth_profile_verification.type = 'email' AND auth_profile_verification.verified = 1 ; ", (r_session['token'],) )
|
||||
cursor.execute(f"SELECT COUNT(*) AS `count`, auth_profile.* FROM auth_profile_verification LEFT JOIN auth_profile ON auth_profile.id = auth_profile_verification.profile WHERE auth_profile.token = %s AND auth_profile_verification.type = 'email' AND auth_profile_verification.verified = 1 ; ", (r_session['token'],) )
|
||||
r_profile = cursor.fetchone()
|
||||
cursor.execute(f"SELECT auth_roles FROM auth_profile_roles WHERE auth_profile = %s ; ", (r_profile['id'],) )
|
||||
r_roles = cursor.fetchall()
|
||||
|
@ -9,7 +9,7 @@ class webmail():
|
||||
def verification(self, APIADDR, params, data):
|
||||
return {
|
||||
"subject" : f"{globalvar.title} email verification",
|
||||
"text" : f"Please visit this link to complete the registration: {data['verify']}. You are not registering this? report on this: {data['notme'].",
|
||||
"text" : f"Please visit this link to complete the registration: {data['verify']} . You are not registering this? report on this: {data['notme']} .",
|
||||
"html" : Template(params["mako"]["email"]['index']).render(
|
||||
title = globalvar.title,
|
||||
header = globalvar.title,
|
||||
|
Loading…
Reference in New Issue
Block a user