3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
13 #include "support/userinfo.h"
14 #include "support/environment.h"
16 #include <boost/assert.hpp>
28 #ifdef HAVE_SYS_TYPES_H
29 # include <sys/types.h>
37 string const user_name()
42 DWORD size = UNLEN + 1;
43 if (!GetUserName(name, &size))
44 return lyx::to_utf8(_("Unknown user"));
47 struct passwd * pw(getpwuid(geteuid()));
50 string name = pw->pw_gecos;
58 string const user_email()
60 string email = getEnv("EMAIL_ADDRESS");
62 email = getEnv("EMAIL");
66 } // namespace support