#include <pwd.h>
#include <unistd.h>
#include <sys/types.h>
-
+
namespace lyx {
+namespace support {
string const user_name()
{
struct passwd * pw(getpwuid(geteuid()));
- lyx::Assert(pw);
-
+ Assert(pw);
+
string name = pw->pw_gecos;
if (name.empty())
name = pw->pw_name;
return name;
}
-
+
string const user_email()
{
return email;
}
-
+} // namespace support
} // namespace lyx