diff options
-rw-r--r-- | vmail-model.lua | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/vmail-model.lua b/vmail-model.lua index 038703d..9954cf4 100644 --- a/vmail-model.lua +++ b/vmail-model.lua @@ -233,14 +233,12 @@ local getuserparams = function(username) end if retval.username and username then retval.username.value = username end if validuser(username) then - -- Get password from voicemail_prefs (don't fail for missing table) - if checktable("voicemail_prefs") then - local sql = "SELECT password FROM voicemail_prefs"..generatewhereclause(username) - local password = getselectresponse(sql) - if retval["vm-password"] and password[1] then - retval["vm-password"].value = password[1].password - end - end + -- Get password from voicemail_prefs + sql = "SELECT password FROM voicemail_prefs"..generatewhereclause(username) + local password = getselectresponse(sql) + if retval["vm-password"] and password[1] then + retval["vm-password"].value = password[1].password + end -- Get the uid that corresponds to this username sql = "SELECT uid FROM voicemail_users"..generatewhereclause(username) |