使用QT和SQLITE DB忘记密码功能
我正在尝试使用SQLite数据库在QT中构建登录屏幕。我已经成功实现了注册并登录功能,并且也想添加“忘记密码”功能。用户应输入他的电子邮件&他在注册时使用的电话号码,如果在DB中找到该号码,则用户可以设置新密码。问题是我不明白我应该用什么功能用该电子邮件& amp;电话号码来替换用户密码。如何通过代码选择DB中的正确行。谢谢您的任何帮助!
I'm trying to build my login screen in QT using SQLITE database. I've already successfully implemented sign up and log in features and I'd like to add "Forgot password" feature as well. The user should input his email & phone number he used while signing up and if it was found in db then the user can set a new password. The problem is that I don't understand what function I should use to replace a user's password with exactly that email&phone number. How to select the right row in the db through the code. Thank you for any help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
(我认为您需要密码恢复过程,而不是“如何查询记录”。如果您需要数据级别的帮助,我们也需要表结构)
这是我一段时间以前的一个客户的工作方式。如果您需要更多澄清,请发表评论。
(我使用DB函数为我的需求生成OTP,以下我为您的参考附加了该代码)
我将为您提供一个示例过程,我前一段时间用于同样的目的。
示例表和DB函数(Postgres DB)
_OTP_CATEGORY ='Mobile'或'Web App'
_OTP_VALUE ='电子邮件或电话#'
_OTP_USER_NAME ='用户名'
其他参数是可选的
(I assume that you required the password recovery process and not about "how to query a record". If you need data level help, we need the table structure as well)
This is how I did for one of my client some time ago. If you need more clarification, please comment.
(I used a DB function to generate the OTP for my requirement and below I attached that code for your reference)
I'll provide you with a sample process that I used some time ago for the same kind of purpose.
Sample Table and a DB function (Postgres DB)
_otp_category = 'Mobile' or 'Web App'
_otp_value = 'email or Phone #'
_otp_user_name = 'User name'
other parameters are optional