X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcore.h;h=ef04b77df6c998bd6ab538d4776b0c2ad398a343;hb=45645a28bdc5b6c1052b3e4cebf8cc80832d205a;hp=994e473ba5b3d78c2415dd7d0be8e2112ab28a3d;hpb=8efbb2ef22f5f007b5dc6d5b15ecf070ccef08ca;p=quassel.git diff --git a/src/core/core.h b/src/core/core.h index 994e473b..ef04b77d 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -127,7 +127,7 @@ public: //! Gets the authenticator configured for a user. /** - * \param userid The user's name as a QString. + * \param userName The user's name as a QString. * \return String value corresponding to the user's configure dauthenticator. */ static inline QString getUserAuthenticator(const QString& userName) @@ -135,6 +135,16 @@ public: return instance()->_storage->getUserAuthenticator(instance()->_storage->getUserId(userName)); } + //! Gets the user ID mapped to a username. This is necessary so that non-database auth methods can log in users properly. + /** + * \param userName The user's name as a QString. + * \return userId The user's ID. + */ + static inline UserId getUserId(const QString& userName) + { + return instance()->_storage->getUserId(userName); + } + //! Change a user's password /** * \param userId The user's ID