X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fidentity.cpp;fp=src%2Fcommon%2Fidentity.cpp;h=1978ebe98ec0f3c4b84092937dc7a4800f5800c3;hp=26520989e49f1fa0a45fc4b3c45a21d9991b51ea;hb=734f29b6efd9aaea6347c2f27f4095a399168e61;hpb=7c9c1b348382b8b77f96a883945c522d32a478d5 diff --git a/src/common/identity.cpp b/src/common/identity.cpp index 26520989..1978ebe9 100644 --- a/src/common/identity.cpp +++ b/src/common/identity.cpp @@ -88,7 +88,10 @@ QString Identity::defaultNick() { nick = shortUserName; #elif defined(Q_OS_UNIX) - QString userName = getlogin(); + QString userName; + struct passwd *pwd = getpwuid(getuid()); + if(pwd) + userName = pwd->pw_name; if(!userName.isEmpty()) nick = userName;