summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2015-08-17 19:35:30 +0000
committerTed Trask <ttrask01@yahoo.com>2015-08-17 19:35:30 +0000
commitbe9e50aeb6292c4ad0f5fa41a64f17afc7bf57e2 (patch)
tree9c1a7c70acb3a55fbef110ba93950f4cf5d3e73a
parent986cfc3b2c146802762f6cb6fcd76717749a0020 (diff)
downloadacf-kamailio-be9e50aeb6292c4ad0f5fa41a64f17afc7bf57e2.tar.bz2
acf-kamailio-be9e50aeb6292c4ad0f5fa41a64f17afc7bf57e2.tar.xz
Fix bug in clientdata handling for get_user
-rw-r--r--kamailio-model.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/kamailio-model.lua b/kamailio-model.lua
index 120e970..ce2fd72 100644
--- a/kamailio-model.lua
+++ b/kamailio-model.lua
@@ -289,12 +289,13 @@ end
function mymodule.get_user(self, clientdata)
local user = mymodule.get_new_user()
- user.value.username.value = clientdata.username or ""
+ self.handle_clientdata(user, clientdata)
+ user.value.password.value = ""
+ user.value.password_confirm.value = ""
user.value.username.errtxt = "Invalid user"
- user.value.domain.value = clientdata.domain or ""
local users = mymodule.list_users()
for i,u in ipairs(users.value) do
- if u.username == clientdata.username and u.domain == clientdata.domain then
+ if u.username == user.value.username.value and u.domain == user.value.domain.value then
user.value.username.errtxt = nil
user.value.username.readonly = true
user.value.domain.readonly = true