Mercurial Hosting > freedit
comparison src/lib/User.luan @ 10:de0cbf515ef5
remove author_id
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 30 Jun 2022 11:11:00 -0600 |
parents | be36282b556a |
children | 298c71e0c854 |
comparison
equal
deleted
inserted
replaced
9:9674275019bb | 10:de0cbf515ef5 |
---|---|
62 | 62 |
63 set_metatable(user,metatable) | 63 set_metatable(user,metatable) |
64 return user | 64 return user |
65 end | 65 end |
66 | 66 |
67 function User.get_by_id(id) | |
68 local doc = Db.get_document("id:"..id) | |
69 return doc and User.from_doc(doc) | |
70 end | |
71 | |
72 function User.get_by_email(email) | 67 function User.get_by_email(email) |
73 local doc = Db.get_document("user_email:"..lucene_quote(email)) | 68 local doc = Db.get_document("user_email:"..lucene_quote(email)) |
74 return doc and from_doc(doc) | 69 return doc and from_doc(doc) |
75 end | 70 end |
76 | 71 |