Adding users and changing passwords needs a configured core.
authorMichael Groh <brot@minad.de>
Thu, 4 Mar 2010 09:59:38 +0000 (10:59 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 4 Mar 2010 13:49:57 +0000 (14:49 +0100)
Fixing bug #924

src/core/core.cpp

index 20049a8..29174b6 100644 (file)
@@ -875,7 +875,7 @@ void Core::createUser() {
     return;
   }
 
-  if(_storage->addUser(username, password).isValid()) {
+  if(_configured && _storage->addUser(username, password).isValid()) {
     out << "Added user " << username << " successfully!" << endl;
   } else {
     qWarning() << "Unable to add user:" << qPrintable(username);
@@ -913,7 +913,7 @@ void Core::changeUserPass(const QString &username) {
     return;
   }
 
-  if(_storage->updateUser(userId, password)) {
+  if(_configured && _storage->updateUser(userId, password)) {
     out << "Password changed successfuly!" << endl;
   } else {
     qWarning() << "Failed to change password!";