auth.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:electron-crash-reporter 作者: lipis 项目源码 文件源码
def get_user_db_from_email(email, password):
  user_dbs, cursors = model.User.get_dbs(email=email, active=True, limit=2)
  if not user_dbs:
    return None
  if len(user_dbs) > 1:
    flask.flash('''We are sorry but it looks like there is a conflict with
        your account. Our support team is already informed and we will get
        back to you as soon as possible.''', category='danger')
    task.email_conflict_notification(email)
    return False

  user_db = user_dbs[0]
  if user_db.password_hash == util.password_hash(user_db, password):
    return user_db
  return None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号