code: def check_old_password(pwdhash, password):
      
      from flask.ext.bcrypt import Bcrypt
      app.config['BCRYPT_LOG_ROUNDS'] = 12
      bcrypt = Bcrypt(app)
      return bcrypt.check_password_hash(pwdhash, password)
docs: Check the old password hash from :func:`password_hash`.
  
      .. versionadded:: 1.1.0
  
      :param str pwdhash: Hash from :func:`password_hash` to check
      :param str password: Password in plaintext
      :return: password match
      :rtype: bool