diff options
author | Ted Trask <ttrask01@yahoo.com> | 2013-10-03 23:50:18 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2013-10-03 23:50:18 +0000 |
commit | f4559966aed8f81d115049007a41a931c77af14d (patch) | |
tree | b5aa011be71de324481e1e1f67fe1c24356d87c6 /authenticator-freeswitch-vmail.lua | |
parent | 5871a8369e0a18f711f7bb31de26e10a4c36df86 (diff) | |
download | acf-freeswitch-vmail-f4559966aed8f81d115049007a41a931c77af14d.tar.bz2 acf-freeswitch-vmail-f4559966aed8f81d115049007a41a931c77af14d.tar.xz |
Only load js libraries if not already loaded
Diffstat (limited to 'authenticator-freeswitch-vmail.lua')
-rw-r--r-- | authenticator-freeswitch-vmail.lua | 31 |
1 files changed, 5 insertions, 26 deletions
diff --git a/authenticator-freeswitch-vmail.lua b/authenticator-freeswitch-vmail.lua index 74065d9..38e6342 100644 --- a/authenticator-freeswitch-vmail.lua +++ b/authenticator-freeswitch-vmail.lua @@ -2,38 +2,21 @@ module (..., package.seeall) require("md5") -a = require("authenticator-plaintext") list_fields = function(self, tabl) - result = a.list_fields(self, tabl) - return result + return nil end read_field = function(self, tabl, field) - result = a.read_field(self, tabl, field) ---[[ - if tabl == authenticator.usertable and field == "" then - -- authenticator is reading all users - local vmcontroller = self:new("freeswitch-vmail/vmail") - local users = vmcontroller.model.list_passwords() - for i,val in ipairs(users.value) do - local string = md5.sumhexa(val.password)..":Voicemail User:/freeswitch-vmail/vmail/USER::/freeswitch-vmail/vmail/listmymessages" - result[#result+1] = { id=val.username, entry=string } - end - vmcontroller:destroy() - end ---]] - return result + return nil end delete_field = function(self, tabl, field) - result = a.delete_field(self, tabl, field) - return result + return false end write_entry = function(self, tabl, field, id, entry) - result = a.write_entry(self, tabl, field, id, entry) - return result + return false end read_entry = function(self, tabl, field, id) @@ -47,13 +30,9 @@ read_entry = function(self, tabl, field, id) end vmcontroller:destroy() end - if not result then - result = a.read_entry(self, tabl, field, id) - end return result end delete_entry = function (self, tabl, field, id) - result = a.delete_entry(self, tabl, field, id) - return result + return false end |