User edit dialog completed
This commit is contained in:
parent
3adbef8c08
commit
e24554a0a0
11 changed files with 315 additions and 47 deletions
|
|
@ -20,6 +20,14 @@ bool user_entity::verify_password(const QString &password) const {
|
|||
return (this->_pwd_hash == QCryptographicHash::hash(password.toLocal8Bit(), QCryptographicHash::Sha3_256));
|
||||
}
|
||||
|
||||
void user_entity::set_password(const QString &new_password) {
|
||||
this->_pwd_hash = QCryptographicHash::hash(new_password.toLocal8Bit(), QCryptographicHash::Sha3_256);
|
||||
}
|
||||
|
||||
void user_entity::set_role(UserRole new_role) {
|
||||
this->_role = new_role;
|
||||
}
|
||||
|
||||
void user_entity::serialize(QDataStream &output) {
|
||||
output << this->_id << this->_login << this->_role << this->_pwd_hash;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue