X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcoreauthhandler.cpp;h=d8f81abe516d0801f8bce7f75c71036001e31969;hp=1d46e65cd230270bcb6dd8d6cba90c3f556c3785;hb=8efbb2ef22f5f007b5dc6d5b15ecf070ccef08ca;hpb=dd1d9d68c406b993230161208cbd17db55dc85a9 diff --git a/src/core/coreauthhandler.cpp b/src/core/coreauthhandler.cpp index 1d46e65c..d8f81abe 100644 --- a/src/core/coreauthhandler.cpp +++ b/src/core/coreauthhandler.cpp @@ -228,7 +228,17 @@ void CoreAuthHandler::handle(const Protocol::Login& msg) // First attempt local auth using the real username and password. // If that fails, move onto the auth provider. - UserId uid = Core::validateUser(msg.user, msg.password); + + // Check to see if the user has the "Database" authenticator configured. + UserId uid = 0; + if (Core::getUserAuthenticator(msg.user) == "Database") { + uid = Core::validateUser(msg.user, msg.password); + } + + // If they did not, *or* if the database login fails, try to use a different authenticator. + // TODO: this logic should likely be moved into Core::authenticateUser in the future. + // Right now a core can only have one authenticator configured; this might be something + // to change in the future. if (uid == 0) { uid = Core::authenticateUser(msg.user, msg.password); }