From: Andreas Granig Date: Wed, 7 Aug 2013 22:34:34 +0200 Subject: sipwise custom auth --- plugins/mod_auth_sql/mod_auth_sql.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/mod_auth_sql/mod_auth_sql.lua b/plugins/mod_auth_sql/mod_auth_sql.lua index 2947a91..8ad8f4a 100644 --- a/plugins/mod_auth_sql/mod_auth_sql.lua +++ b/plugins/mod_auth_sql/mod_auth_sql.lua @@ -71,7 +71,7 @@ local function getsql(sql, ...) end local function get_password(username) - local stmt, err = getsql("SELECT `password` FROM `authreg` WHERE `username`=? AND `realm`=?", username, module.host); + local stmt, err = getsql("SELECT `password` FROM `subscriber` WHERE `username`=? AND `domain`=?", username, module.host); if stmt then for row in stmt:rows(true) do return row.password; @@ -109,7 +109,7 @@ function provider.get_sasl_handler() end function provider.users() - local stmt, err = getsql("SELECT `username` FROM `authreg` WHERE `realm`=?", module.host); + local stmt, err = getsql("SELECT `username` FROM `subscriber` WHERE `domain`=?", module.host); if stmt then local next, state = stmt:rows(true) return function()