aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-04-09 17:58:24 +0200
committerdec05eba <dec05eba@protonmail.com>2020-08-18 23:38:23 +0200
commit7713c01939b19b588e6e99d4b583447b9e2362f6 (patch)
treecc3fe6b6b9e0589658aee04071f0570933ae88d9 /src
parenta19d5bf1fae5cea27d50982b5b40306863b377a0 (diff)
Fix error message when trying to login/register when already logged in
Diffstat (limited to 'src')
-rw-r--r--src/Room.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Room.cpp b/src/Room.cpp
index 44407c1..d3b91db 100644
--- a/src/Room.cpp
+++ b/src/Room.cpp
@@ -502,7 +502,7 @@ namespace dchat
{
std::lock_guard<std::recursive_mutex> lock(roomModifyMutex);
if(loggedIn)
- throw std::runtime_error(std::string("You are already logged in as ") + username);
+ throw std::runtime_error(std::string("You are already logged in as ") + currentUsername);
auto storedNodes = database->getStoredNodeUserInfoDecrypted(username, password);
loggedIn = true;
@@ -524,7 +524,7 @@ namespace dchat
{
std::lock_guard<std::recursive_mutex> lock(roomModifyMutex);
if(loggedIn)
- throw std::runtime_error(std::string("You are already logged in as ") + username);
+ throw std::runtime_error(std::string("You are already logged in as ") + currentUsername);
database->storeUserWithoutNodes(username, password);
loggedIn = true;