Parameters for sql execute
This commit is contained in:
@@ -15,10 +15,18 @@ USER_PROPERTY(Comment)
|
||||
|
||||
|
||||
#include <QObject>
|
||||
#include <QtCore/QCryptographicHash>
|
||||
|
||||
class User:public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
static bool QueryUser(QString userID, QString Pwd);
|
||||
static QString getEncryptedPassword(const QString& password)
|
||||
{
|
||||
QByteArray bytePwd = password.toLatin1();
|
||||
QByteArray bytePwdMd5 = QCryptographicHash::hash(bytePwd, QCryptographicHash::Md5);
|
||||
return bytePwdMd5.toHex();
|
||||
}
|
||||
static User* Current(){
|
||||
return currentUser;
|
||||
}
|
||||
@@ -46,7 +54,10 @@ public:
|
||||
USER_PROPERTIES_MACRO()
|
||||
#undef USER_PROPERTY
|
||||
#undef USER_READONLY_PROPERTY
|
||||
|
||||
void restorePassword(const QString& original_pwd){
|
||||
m_Password = original_pwd;
|
||||
mf_Password = false;
|
||||
}
|
||||
bool submitChange();
|
||||
private:
|
||||
static User* currentUser;
|
||||
|
||||
Reference in New Issue
Block a user