98 local account = datamanager.load(username, host, "accounts"); |
98 local account = datamanager.load(username, host, "accounts"); |
99 if not account then |
99 if not account then |
100 log("debug", "account not found for username '%s' at host '%s'", username, module.host); |
100 log("debug", "account not found for username '%s' at host '%s'", username, module.host); |
101 return nil, "Auth failed. Invalid username"; |
101 return nil, "Auth failed. Invalid username"; |
102 end |
102 end |
103 if (account.hashpass == nil or string.len(account.hashpass) == 0) and (account.password == nil or string.len(account.password) == 0) then |
103 --[[if (account.hashpass == nil or string.len(account.hashpass) == 0) and (account.password == nil or string.len(account.password) == 0) then |
104 log("debug", "account password not set or zero-length for username '%s' at host '%s'", username, module.host); |
104 log("debug", "account password not set or zero-length for username '%s' at host '%s'", username, module.host); |
105 return nil, "Auth failed. Password invalid."; |
105 return nil, "Auth failed. Password invalid."; |
106 end |
106 end]] |
107 return true; |
107 return true; |
108 end |
108 end |
109 |
109 |
110 function provider.create_user(username, password) |
110 function provider.create_user(username, password) |
111 local salt = generate_uuid(); |
111 local salt = generate_uuid(); |