st->Prepare("insert into tb_users_services (fk_user, fk_service) \
values (?, (select pk_service from tb_services \
where name = ?))");
- for(std::vector<std::string>::const_iterator it = conf.service.begin(); it != conf.service.end(); ++it)
+ for(std::vector<std::string>::const_iterator it = conf.services.begin(); it != conf.services.end(); ++it)
{
st->Set(1, uid);
st->Set(2, *it);
{
std::string name;
st->Get(1, name);
- conf->service.push_back(name);
+ conf->services.push_back(name);
}
// User data
where fk_user = ?");
st->Set(1, uid);
st->Execute();
- conf->ips.Erase();
+ USER_IPS ips;
while (st->Fetch())
{
IP_MASK im;
st->Get(1, (int32_t &)im.ip);
st->Get(2, (int32_t &)im.mask);
- conf->ips.Add(im);
+ ips.Add(im);
}
+ conf->ips = ips;
tr->Commit();
}