comparison src/lib/User.luan @ 58:31c895b73bd0

improve change email
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 29 Nov 2022 16:09:17 -0700
parents 169ac5fdb320
children 02d8876dc41d
comparison
equal deleted inserted replaced
57:169ac5fdb320 58:31c895b73bd0
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 = doc.hidden_password 42 hidden_password_1 = doc.hidden_password_1
43 hidden_password_2 = doc.hidden_password_2
43 } 44 }
44 set_local_only(users_by_id,user.id,user) 45 set_local_only(users_by_id,user.id,user)
45 return user 46 return user
46 end 47 end
47 48
52 id = user.id 53 id = user.id
53 user_email = email 54 user_email = email
54 password = user.password 55 password = user.password
55 user_name = user.name 56 user_name = user.name
56 created = user.created or time_now() 57 created = user.created or time_now()
57 hidden_password = user.hidden_password 58 hidden_password_1 = user.hidden_password_1
59 hidden_password_2 = user.hidden_password_2
58 } 60 }
59 end 61 end
60 62
61 local metatable = {} 63 local metatable = {}
62 function metatable.__index(user,key) 64 function metatable.__index(user,key)