'Authenticate a user against the local password database.
user_id is checked case insensitively, but will return None if there are
multiple inexact matches.
Args:
user_id (str): complete @user:id
Returns:
(str) the canonical_user_id, or None if unknown user / bad password'

@defer.inlineCallbacks
def _check_local_password(self, user_id, password):

    lookupres = (yield self._find_user_id_and_pwd_hash(user_id))
    if (not lookupres):
        defer.returnValue(None)
    (user_id, password_hash) = lookupres
    result = self.validate_hash(password, password_hash)
    if (not result):
        logger.warn('Failed    password    login    for    user    %s', user_id)
        defer.returnValue(None)
    defer.returnValue(user_id)
