=fOSUserName() (1 Viewer)

Petros

Registered User.
Local time
Today, 05:42
Joined
Jun 30, 2010
Messages
145
Hi all, hope this is the right forum for this question...

I use this function to pick-up the system user and create a time/name stamp. Unfortunately this also can create a security issue since
the username is to be considered “personal” and not be shared. How do i create an “alias”...

example

=fOSUserName() Mbensson...but i want to display Martin.B

I have created a signature table were Martin.B is included..but how to determine the connection between Mbensson and Martin.B.

20 unique users are accessing the db daily

Thanks!
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 20:42
Joined
Aug 30, 2003
Messages
36,125
You would need to have a table that contained fields for both those values, and look up the alias from the user name. You could use DLookup(), query joins, etc.
 

Petros

Registered User.
Local time
Today, 05:42
Joined
Jun 30, 2010
Messages
145
You would need to have a table that contained fields for both those values, and look up the alias from the user name. You could use DLookup(), query joins, etc.

Thanks pbaldy..i often use the =fOSUserName() on the "open" event of an form or on the "after update" event of an form..how would that work in relation to you suggested method?

Thanks!
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 20:42
Joined
Aug 30, 2003
Messages
36,125
Two ways to go that I see. First is to continue to get and store the user ID as you have done, but don't display it to the users. You can join the above mentioned table into existing queries to get the alias name. Second is to look up the alias at the same point you get the user ID, and store that instead. You could also modify the function to look up the alias after it finds the user ID so it returns the alias instead of the user ID.
 

Users who are viewing this thread

Top Bottom