X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcore.h;h=8901542b9e96dfcad6e6b640a4b6c4a01a3c0502;hb=6d191d78dfafd07daeb3b39e140677c10a1e4a6a;hp=deef9114ece8a14c5cd5f1b707529c4e2c34c638;hpb=eaa1bd30bc088e5cae6d8a742d7aedb3d8ff1897;p=quassel.git diff --git a/src/core/core.h b/src/core/core.h index deef9114..8901542b 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 by the Quassel Project * + * Copyright (C) 2005-2016 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -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,7 +533,7 @@ private slots: void socketError(QAbstractSocket::SocketError err, const QString &errorString); void setupClientSession(RemotePeer *, UserId); - void changeUserPass(const QString &username); + bool changeUserPass(const QString &username); private: Core(); @@ -542,7 +551,7 @@ private: void unregisterStorageBackends(); void unregisterStorageBackend(Storage *); bool selectBackend(const QString &backend); - void createUser(); + bool createUser(); void saveBackendSettings(const QString &backend, const QVariantMap &settings); QVariantMap promptForSettings(const Storage *storage);