b2bb7686c16aae047ea8a0480aa728aa6edb69dd,gb/user.py,User,create,#User#Any#Any#Any#Any#,11
Before Change
self.role = role
self.pwdhash = bcrypt.hashpw(password, bcrypt.gensalt(12))
cur = db.cursor()
cur.execute("INSERT INTO user (name, email, pwdhash, role) VALUES (%s, %s, %s, %s)",
(name, email, self.pwdhash, role))
self.id = db.connection().insert_id
db.connection().commit()
cur.close()
return self
def get_by_email(email):
After Change
self.role = role
self.pwdhash = bcrypt.hashpw(password, bcrypt.gensalt(12))
self.cur.execute("INSERT INTO user (name, email, pwdhash, role) VALUES (%s, %s, %s, %s)",
(name, email, self.pwdhash, role))
self.id = self.insert_id()
self.commit()
return self
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 11
Instances
Project Name: graphbrain/graphbrain
Commit Name: b2bb7686c16aae047ea8a0480aa728aa6edb69dd
Time: 2011-08-16
Author: telmo@telmomenezes.net
File Name: gb/user.py
Class Name: User
Method Name: create
Project Name: graphbrain/graphbrain
Commit Name: b2bb7686c16aae047ea8a0480aa728aa6edb69dd
Time: 2011-08-16
Author: telmo@telmomenezes.net
File Name: gb/node.py
Class Name: Node
Method Name: create
Project Name: graphbrain/graphbrain
Commit Name: b2bb7686c16aae047ea8a0480aa728aa6edb69dd
Time: 2011-08-16
Author: telmo@telmomenezes.net
File Name: gb/link.py
Class Name: Link
Method Name: create
Project Name: graphbrain/graphbrain
Commit Name: b2bb7686c16aae047ea8a0480aa728aa6edb69dd
Time: 2011-08-16
Author: telmo@telmomenezes.net
File Name: gb/graph.py
Class Name: Graph
Method Name: create