[Cvsnt] Getting username

Russell Brasser radix at otsoftware.com
Tue Feb 12 03:42:28 GMT 2002


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


Gary,


Ooops I jumped the gun. I see that you are using $ENV{'USER'} instead of
$ENV{'USERNAME'}, and although this seems to be unpopulated for a local user
it works for the pserver user.... therefore the combination of that with
getlogin works for all cases.


THANKS!!!

:-)

-Russ


"Gary L Peskin" <garyp at firstech.com> wrote in message
news:00b701c1b365$5e440770$116da8c0 at GARY004...
> I use this:
>
> $login = $ENV{'USER'} || getlogin || (getpwuid($<))[0] ||
> sprintf("uid#%d",$<);
>
> I don't really know perl but it seems to work.
>
> HTH,
> Gary
>
> > -----Original Message-----
> > From: cvsnt-admin at cvsnt.org [mailto:cvsnt-admin at cvsnt.org] On
> > Behalf Of Russell Brasser
> > Sent: Monday, February 11, 2002 3:24 PM
> > To: cvsnt at cvsnt.org cvsnt downloads at march-hare.com @CVSNT on Twitter CVSNT on Facebook
> > Subject: [Cvsnt] Getting username
> >
> >
> > Hello,
> >
> >     I am running a perl script to log checkins and send
> > notifications. In thi script I am using a standard way of
> > getting the username so that the logs/e-mails can reflect who
> > checked what in.
> >
> > When checking in locally, everything works fine. However,
> > when I check in using the pserver (even if it is in
> > "impersonation" mode) the username always says SYSTEM.
> >
> > Any suggestions?
> >
> > Thanks
> > -Russ
> >
> >
> > _______________________________________________
> > Cvsnt mailing list
> > Cvsnt at cvsnt.org http://www.cvsnt.org/cgi-bin/mailman/listinfo/cvsnt https://www.march-hare.com/cvspro/en.asp#downcvs
> >
>
> _______________________________________________
> Cvsnt mailing list
> Cvsnt at cvsnt.org
> http://www.cvsnt.org/cgi-bin/mailman/listinfo/cvsnt https://www.march-hare.com/cvspro/en.asp#downcvs


_______________________________________________
Cvsnt mailing list
Cvsnt at cvsnt.org
http://www.cvsnt.org/cgi-bin/mailman/listinfo/cvsnt https://www.march-hare.com/cvspro/en.asp#downcvs



More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook