liquid_feedback_frontend
changeset 1734:aebc3b064f85
Automatically add verified member to selected unit
author | bsw |
---|---|
date | Thu Sep 30 22:39:46 2021 +0200 (2021-09-30) |
parents | 30017c87369e |
children | 5a8a09119865 |
files | app/main/registration/_action/register.lua |
line diff
1.1 --- a/app/main/registration/_action/register.lua Thu Sep 30 10:07:17 2021 +0200 1.2 +++ b/app/main/registration/_action/register.lua Thu Sep 30 22:39:46 2021 +0200 1.3 @@ -351,6 +351,12 @@ 1.4 } 1.5 } 1.6 if success == "ok" then 1.7 + local unit_privilege = Privilege:new() 1.8 + unit_privilege.member_id = verification.requesting_member_id 1.9 + unit_privilege.unit_id = tonumber(verification.request_data.unit) 1.10 + unit_privilege.voting_right = true 1.11 + unit_privilege.initiative_right = true 1.12 + unit_privilege:save() 1.13 request.redirect{ external = encode.url { module = "registration", view = "register_completed" } } 1.14 end 1.15