fix sesion never end and implement create user funcionality
This commit is contained in:
@@ -89,3 +89,11 @@ bool msql_acces::get_package_exists(std::string package){
|
||||
|
||||
return ret>0;
|
||||
}
|
||||
|
||||
void msql_acces::create_user(std::string user, std::string pass, bool admin){
|
||||
sql::PreparedStatement *pstmt = con->prepareStatement("insert into users(username, passwd, admin) values(?, ?, ?)");
|
||||
pstmt->setString(1,user);
|
||||
pstmt->setString(2,pass);
|
||||
pstmt->setBoolean(3,admin);
|
||||
sql::ResultSet *res = pstmt->executeQuery();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user