| 78 | |
| 79 | |
| 80 | bool AuthTable::setUserToken(const QString& user) |
| 81 | { |
| 82 | QVariantMap map; |
| 83 | map["token"] = QCryptographicHash::hash(QUuid::createUuid().toByteArray(), QCryptographicHash::Sha512).toHex(); |
| 84 | |
| 85 | VectorPair cond; |
| 86 | cond.append(CPair("user", user)); |
| 87 | return updateRecord(cond, map); |
| 88 | } |
| 89 | |
| 90 | |
| 91 | const QByteArray AuthTable::getUserToken(const QString& user) |