因为用户名和邮箱用的都是一个字段,只需要验证数据库的时候加一个or条件就行了
select * from table where userName = inputName or email = inputName
只要满足一个条件就可以登陆了
这样就可以实现双登陆了