Hi Davis,
User name in my example was misleading. It is an internal user in MarkLogic and HTTP server internal security is set to true. I am not using the external security. In both the cases, xdmp:get-request-username() is returning the user name correctly. xdmp:user-last-login() is what behaving differently. Sudheer From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of David Ennis Sent: Wednesday, April 22, 2015 6:09 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] xdmp:user-last-login not returning anything while executing it after custom log in page HI. You've changed your auth type and I note that your xQuery sample mentions ldap user. I know you mention application'level and not external auth, but perhaps this is related: get-current-user, for instance does not return the same value depending on the authentication method. http://docs.marklogic.com/guide/security/external-auth (look to the bottom of the page) Kind Regards, David Ennis David Ennis Content Engineer [HintTech] <http://www.hinttech.com/> Mastering the value of content creative | technology | content Delftechpark 37i 2628 XJ Delft The Netherlands T: +31 88 268 25 00 M: +31 63 091 72 80 [http://www.hinttech.com]<http://www.hinttech.com> [http://www.hinttech.com/signature/Twitter_HintTech.png] <https://twitter.com/HintTech> [http://www.hinttech.com/signature/Facebook_HintTech.png] <http://www.facebook.com/HintTech> [http://www.hinttech.com/signature/Linkedin_HintTech.png] <http://www.linkedin.com/company/HintTech> On 22 April 2015 at 22:10, Sudheer Yalaverthi <sudheer.yalaver...@db.com<mailto:sudheer.yalaver...@db.com>> wrote: Hi, I am trying to develop a custom log in page and display the users last log in details but xdmp:user-last-login seems to not return anything. Initially I have a http server with last log in details enabled and authentication scheme to basic. While I accessed a sample.xqy over this server on IE, I logged in with user credentials and in the subsequent accesses, I was able to get the last log in details using the below line. xdmp:user-last-login(xdmp:get-request-user())//*:last-successful-login/text() This worked pretty well with basic authentication scheme. Now I developed a custom login page and set the application-level authentication scheme on the application server. After I log in, I am able to see the user name in the sample.xqy but not the last log in details. The same line is giving no response. When I executed the below query in qconsole, it is giving nothing though I have an xml related to this user in the last log in database. xdmp:user-last-login(xdmp:user("ldapuser1")) Any thoughts? Regards, Sudheer --- This communication may contain confidential and/or privileged information. If you are not the intended recipient (or have received this communication in error) please notify the sender immediately and destroy this communication. Any unauthorized copying, disclosure or distribution of the material in this communication is strictly forbidden. Deutsche Bank does not render legal or tax advice, and the information contained in this communication should not be regarded as such. _______________________________________________ General mailing list General@developer.marklogic.com<mailto:General@developer.marklogic.com> Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general --- This communication may contain confidential and/or privileged information. If you are not the intended recipient (or have received this communication in error) please notify the sender immediately and destroy this communication. Any unauthorized copying, disclosure or distribution of the material in this communication is strictly forbidden. Deutsche Bank does not render legal or tax advice, and the information contained in this communication should not be regarded as such.
_______________________________________________ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general