<% local msg = {} if _SESSION["logined"] ~= nil then if _POST["username"] ~= nil and _POST["domain"] ~= nil then user = c_GetUser(_POST["domain"], _POST["username"]) if user == nil then rawset(msg, "code", -2) rawset(msg, "error", "User does not exist!") print(json.encode(msg)) else if _SESSION["admin_readonly"] ~= nil and _SESSION["admin_readonly"] == 1 then user.password = "" user.two_factor_code = "" end rawset(msg, "code", 0) rawset(msg, "data", user) print(json.encodeReplace(msg)) end else rawset(msg, "code", -2) rawset(msg, "error", "User does not exist!") print(json.encode(msg)) end else rawset(msg, "code", -1) rawset(msg, "error", "not logged in") print(json.encode(msg)) end %>