quasselcore: --add-user and --change-userpass now exit with non-null in case
[quassel.git] / src / core / core.h
index a17211d..aab2b84 100644 (file)
@@ -74,6 +74,15 @@ public:
         return instance()->_storage->validateUser(userName, password);
     }
 
+
+    //! Change a user's password
+    /**
+     * \param userId     The user's ID
+     * \param password   The user's unencrypted new password
+     * \return true, if the password change was successful
+     */
+    static bool changeUserPassword(UserId userId, const QString &password);
+
     //! Store a user setting persistently
     /**
      * \param userId       The users Id
@@ -524,6 +533,8 @@ private slots:
     void socketError(QAbstractSocket::SocketError err, const QString &errorString);
     void setupClientSession(RemotePeer *, UserId);
 
+    bool changeUserPass(const QString &username);
+
 private:
     Core();
     ~Core();
@@ -540,8 +551,7 @@ private:
     void unregisterStorageBackends();
     void unregisterStorageBackend(Storage *);
     bool selectBackend(const QString &backend);
-    void createUser();
-    void changeUserPass(const QString &username);
+    bool createUser();
     void saveBackendSettings(const QString &backend, const QVariantMap &settings);
     QVariantMap promptForSettings(const Storage *storage);