comparison mod_http_admin_api/mod_http_admin_api.lua @ 6331:6a3b38051d74

mod_http_admin_api: get_user_info: Fix missing error return
author Matthew Wild <mwild1@gmail.com>
date Wed, 01 Oct 2025 18:16:25 +0100
parents 4e63151010bf
children 1fc38a840baa
comparison
equal deleted inserted replaced
6330:4e63151010bf 6331:6a3b38051d74
222 return avatar_info; 222 return avatar_info;
223 end 223 end
224 224
225 local function get_user_info(username) 225 local function get_user_info(username)
226 if not usermanager.user_exists(username, module.host) then 226 if not usermanager.user_exists(username, module.host) then
227 return nil; 227 return nil, "user-not-found";
228 end 228 end
229 local display_name; 229 local display_name;
230 do 230 do
231 local pep_service = mod_pep.get_pep_service(username); 231 local pep_service = mod_pep.get_pep_service(username);
232 local ok, _, nick_item = pep_service:get_last_item(xmlns_nick, true); 232 local ok, _, nick_item = pep_service:get_last_item(xmlns_nick, true);