lyx_mirror/src/support/getUserName.C
Lars Gullik Bjønnes 45a03f4f67 use the new sstream return non-pods as const, use string instead of char * in a lot of places
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1019 a592a061-630c-0410-9148-cb99ea01b6c8
2000-09-14 17:53:12 +00:00

16 lines
295 B
C

#include <config.h>
#include "support/lyxlib.h"
#include "support/filetools.h"
#include "gettext.h"
string const lyx::getUserName()
{
string userName(GetEnv("LOGNAME"));
if (userName.empty())
userName = GetEnv("USER");
if (userName.empty())
userName = _("unknown");
return userName;
}