comparison src/lib/User.luan @ 59:02d8876dc41d

improve change email
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 29 Nov 2022 18:45:22 -0700
parents 31c895b73bd0
children 389e5d8e5f8a
comparison
equal deleted inserted replaced
58:31c895b73bd0 59:02d8876dc41d
37 id = doc.id 37 id = doc.id
38 email = doc.user_email 38 email = doc.user_email
39 password = doc.password 39 password = doc.password
40 name = doc.user_name 40 name = doc.user_name
41 created = doc.created 41 created = doc.created
42 hidden_password_1 = doc.hidden_password_1 42 hidden_password = doc.hidden_password
43 hidden_password_2 = doc.hidden_password_2 43 new_email = doc.new_email
44 } 44 }
45 set_local_only(users_by_id,user.id,user) 45 set_local_only(users_by_id,user.id,user)
46 return user 46 return user
47 end 47 end
48 48
53 id = user.id 53 id = user.id
54 user_email = email 54 user_email = email
55 password = user.password 55 password = user.password
56 user_name = user.name 56 user_name = user.name
57 created = user.created or time_now() 57 created = user.created or time_now()
58 hidden_password_1 = user.hidden_password_1 58 hidden_password = user.hidden_password
59 hidden_password_2 = user.hidden_password_2 59 new_email = user.new_email
60 } 60 }
61 end 61 end
62 62
63 local metatable = {} 63 local metatable = {}
64 function metatable.__index(user,key) 64 function metatable.__index(user,key)