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>
26 #include <sys/types.h>
33 string const user_name()
38 DWORD size = UNLEN + 1;
39 if (!GetUserName(name, &size))
40 return _("Unknown user");
43 struct passwd * pw(getpwuid(geteuid()));
46 string name = pw->pw_gecos;
54 string const user_email()
56 string email = getEnv("EMAIL_ADDRESS");
58 email = getEnv("EMAIL");
62 } // namespace support