Home > Ask the Domino Experts > Questions & Answers > Determine logged on users using LotusScript
Ask The Domino Expert: Questions & Answers
EMAIL THIS

Determine logged on users using LotusScript

Jens Bruntt EXPERT RESPONSE FROM: Jens Bruntt

Pose a Question
Other Domino Categories
Meet all Domino Experts
Become an Expert for this site
>
QUESTION POSED ON: 23 August 2004
Hi Jens! I'm developing a Web browser-based application based. I want to know how to get the names of the users who are logged onto the application. I can see them in the Domino administrator by command "tell HTTP show users." But can I get this information by LotusScript? Thanks a lot!

>

You need to look at the CGI-variable Remote_User. Have a look in the Lotus Design help for "Table of CGI variable names."

If this is in a WebQueryOpen agent, userName will hold the authenticated name:

Dim session As New NotesSession
Dim doc As NotesDocument
Dim userName As String
Set doc = session.DocumentContext
userName = doc.Remote_User(0)
If you don't absolutely have to use LotusScript, there is a @Function that retrieves the name from the CGI-variable: @GetHttpHeader("Remote_User")

MEMBER FEEDBACK TO THIS ASK THE EXPERT Q&A:

I think you have totally missed the question with your answer. The CGI-variable Remote_User is showing only one user -- the single active user in the Web browser, and not all users that have been authenticated on the server (as the person asking the question was aiming at).

So, back to the original question: Is there a way to use LotusScript to write and read the results of admin console commands (not only 'Tell HTTP show users' but other commands as well)?

— Kenneth A.

******************************************

You are absolutely right -- I misunderstood the question. So here's another try.

I haven't heard of a way of tapping what is on the server console, but I have a different idea. First, here's a comment on the tell HTTP show users command:

If it was possible to tap what you get when you do a tell HTTP show users, you might have a problem because this information is per hostname. If your application is the only one running from a certain hostname, this would of course not be a problem.

Now, on to my idea. It requires you to be running the Domino server on Win32. In the Sandbox on what's it's name (I still can't find out what that place that was formerly known as notes.net is called), there is an excellent class available for accessing user activity. It's called NotesUserActivity class (http://www-10.lotus.com/ldd/sandbox.nsf/ecc552f1ab6e46e4852568a90055c4cd/c12a2fd2142758b68525688d00708397?OpenDocument).

User activity is what you see if you (from the Notes client) get the database property box, second tab, then click "user detail." It tells you that user x read y documents at a certain time, and it holds a log of at least a month back (this is probably controlled by a notes.ini setting). This user activity log also holds activity for Web users.

My suggestion would be to create an agent that taps this information when needed. I don't know what you want to use the information for, so I can't be more specific as to how exactly you should go about using this class, but I'm sure that you should be able to work something out. It is my impression that the log only holds information about documents being read, so displaying a view will not be in the log. Also, the log is not updated the moment that someone reads a document -- there is a small lag (up to about one minute from my observations).

Jens Bruntt

Do you have comments on this Ask the Expert question and response? Let us know.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Lotus Notes Domino on Blackberry and mobile devices
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts