diff --git a/libtransport/UserRegistration.cpp b/libtransport/UserRegistration.cpp index 4da637600c09218d3b77518ed99b92eca2ad0972..d7b326f57c1c8f0ec2e3081c2976bf55002c0330 100644 --- a/libtransport/UserRegistration.cpp +++ b/libtransport/UserRegistration.cpp @@ -51,7 +51,7 @@ bool UserRegistration::registerUser(const UserInfo &row, bool allowPasswordChang UserInfo dummy; bool registered = m_storageBackend->getUser(row.jid, dummy); - if (registered && !allowPasswordChange) { + if (!registered || (registered && allowPasswordChange)) { m_storageBackend->setUser(row); doUserRegistration(row); onUserRegistered(row);