e4378ddc530abc356c8ca4e3e6a317562b104c96,gb/user.py,User,get_by_email,#User#Any#,42
Before Change
def get_by_email(self, email):
self.execute("SELECT id, name, pwdhash, role, creation_ts, session, session_ts FROM user WHERE email=%s", (email,))
row = self.cur.fetchone()
self.email = email
self.id = row[0]
self.name = row[1]
self.pwdhash = row[2]
self.role = row[3]
self.creation_ts = row[4]
self.session = row[5]
self.session_ts = row[6]
return self
def check_password(self, password):
After Change
return self
def get_by_email(self, email):
self.d = self.db.nodes.find_one({"type": "user", "email": email})
return self
def check_password(self, password):
if self.d["pwdhash"] == bcrypt.hashpw(password, self.d["pwdhash"]):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: graphbrain/graphbrain
Commit Name: e4378ddc530abc356c8ca4e3e6a317562b104c96
Time: 2011-10-26
Author: telmo@telmomenezes.net
File Name: gb/user.py
Class Name: User
Method Name: get_by_email
Project Name: graphbrain/graphbrain
Commit Name: e4378ddc530abc356c8ca4e3e6a317562b104c96
Time: 2011-10-26
Author: telmo@telmomenezes.net
File Name: gb/user.py
Class Name: User
Method Name: get_by_email
Project Name: graphbrain/graphbrain
Commit Name: e4378ddc530abc356c8ca4e3e6a317562b104c96
Time: 2011-10-26
Author: telmo@telmomenezes.net
File Name: gb/graph.py
Class Name: Graph
Method Name: get_by_owner_and_name
Project Name: mindsdb/mindsdb
Commit Name: 3629e4a6b60ee3486f550b30a1edf0d0b1fafc93
Time: 2018-09-04
Author: jorge.torres.maldonado@gmail.com
File Name: libs/phases/stats_loader/stats_loader.py
Class Name: StatsLoader
Method Name: run