Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- NetLib for Clipper, Version 6.0 - n_whoami( [ <nstation> ] ) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_WHOAMI( [ <nStation> ] )


Parameters

<nStation>
Number of station (1-255) in question.


Returns

N_WHOAMI(<nStation>) returns:

Network       Return value
Novell        ID of user logged-in at the station.

NetBIOS       DOS/NetBIOS machine name.

Banyan        Street Talk name.

Stand alone   A null string.


A null string is returned if no one is logged in at the station; if an 
invalid station number was specified; or if NetLib is running on a 
stand alone system.

N_WHOAMI() with no parameters returns the ID of the user logged into 
the current station. A null string is returned if no one is logged in 
at the current station.


Description

Use N_FULLNAME() to obtain the user name associated with the ID. 


Examples
// The following function returns the user-id
// of the station that has the current record
// locked. Null string is returned if none.

FUNCTION WhoHasIt
   LOCAL nCulprit
   nCulprit = ASC(N_CHECKR(RECNO()))

   IF nCulprit > 0
      RETURN(N_WHOAMI(nCulprit))

   ELSE
      RETURN('')
   ENDIF

// Create top line status bar with current
// user-id & time-of-day
PROCEDURE header
   @ 1, 0 SAY 'User ID: ' + N_WHOAMI()
   @ 1, 64 SAY 'Time   : ' + TIME()
RETURN



See Also: N_FULLNAME() N_SERVER() N_WHERE() N_WHOAREYOU()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson