16 lines
403 B
C++
16 lines
403 B
C++
#include "User.h"
|
|
#include <Wt/Dbo/Impl.h>
|
|
|
|
DBO_INSTANTIATE_TEMPLATES(User)
|
|
Wt::Dbo::dbo_traits<User>::IdType User::stringToId(const std::string &s) {
|
|
std::size_t pos = std::string::npos;
|
|
auto result = std::stoll(s, &pos);
|
|
if (pos != s.size())
|
|
return Wt::Dbo::dbo_traits<User>::invalidId();
|
|
else
|
|
return result;
|
|
}
|
|
|
|
User::User() : role(Visitor), failedLoginAttempts(0) {
|
|
}
|