Push notification of who (by name) disarmed the system (LUA)

I’ve been surfing this forum and have taken bits of code from here and there to create the following; which using Prowl, will notify you of the name of the ‘user’ who disarmed the system

[code]function cb_LastUser()

users = {}
users[“0001”]=“Chris”
users[“0002”]=“Mandy”
users[“0003”]=“Brian”
users[“0004”]=“Emma”
users[“0040”]=“Master”
local svc = “urn:micasaverde-com:serviceId:AlarmPartition2”
local dev = 344

local last_user_num_str = luup.variable_get(svc, “LastUser”, dev)
local last_status = luup.variable_get(svc, “ArmMode”, dev)
local last_user_name = users[last_user_num_str], 1

if (users[last_user_num_str] == nil) then
luup.log("Last user #: " … last_user_num_str, 1)
else
luup.log(“Last user: '” … users[last_user_num_str] … “'”, 1)
luup.log(last_status)
luup.log(last_user_name)
luup.inet.wget(“http://www.prowlapp.com/publicapi/add?apikey=Abcdefghijklmnopqrstup1234567898b21f&application=Vera+Security+&event=+DSC+Notification&description=” … last_user_name … “+has+just+” … last_status … “+the+DSC+Alarm+System&priority=1”)
end
end

luup.log(cb_LastUser())
[/code]

This should be able to be used in a scene set up to run/trigger when ArmMode is changed to disarmed.

While it works, I would still welcome any suggestions on how to improve the code.

Other thoughts … Maybe this can also work the other way around so if Vera knows who you are, by name - then it could run some similar code to input your PIN for you etc.