From: Ben Rosser Date: Mon, 28 Dec 2015 22:18:45 +0000 (-0500) Subject: First attempt local auth, then try external provider X-Git-Tag: travis-deploy-test~284 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=8435819ba319ea8f677dfe85f0ac639e29ffad1e First attempt local auth, then try external provider --- diff --git a/src/core/coreauthhandler.cpp b/src/core/coreauthhandler.cpp index 47c57965..a4c06f33 100644 --- a/src/core/coreauthhandler.cpp +++ b/src/core/coreauthhandler.cpp @@ -218,12 +218,12 @@ void CoreAuthHandler::handle(const Login &msg) if (!checkClientRegistered()) return; - //UserId uid = Core::validateUser(msg.user, msg.password); - UserId uid = Core::authenticateUser(msg.user, msg.password); - - // Try doing direct database auth if the provider failed, first. - if (uid == 0) { - uid = Core::validateUser(msg.user, msg.password); + // 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); + if (uid == 0) + { + uid = Core::authenticateUser(msg.user, msg.password); } if (uid == 0) {