Commit be877020 authored by Mathias Goebel's avatar Mathias Goebel 🎠
Browse files

refine login

parent a36bc41f
......@@ -204,7 +204,11 @@ return
};
declare function local:login($col) {
if(false() = xmldb:login($col, config:get('sade.user'), config:get("sade.password")))
then (xmldb:login($col, "admin", ""))
(: check for db availability :)
if(httpclient:get(xs:anyURI("http://localhost:8080"), false(), ())/@statusCode = 200)
then
if(false() = xmldb:login($col, config:get('sade.user'), config:get("sade.password")))
then (xmldb:login($col, "admin", ""))
else true()
else true()
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment