#include <cerrno>
-#include "users_methods.h"
-
-#include "users.h"
-#include "admins.h"
-#include "tariffs.h"
+#include "stg/users.h"
+#include "stg/admins.h"
+#include "stg/tariffs.h"
+#include "stg/user_ips.h"
+#include "stg/common.h"
+#include "stg/user_property.h"
+#include "users_methods.h"
#include "rpcconfig.h"
#include "user_helper.h"
-#include "user_ips.h"
#include "utils.h"
-#include "common.h"
-#include "user_property.h"
//------------------------------------------------------------------------------
ADMIN * admin = NULL;
-if (admins->FindAdmin(adminInfo.admin, &admin))
+if (admins->Find(adminInfo.admin, &admin))
{
*retvalPtr = xmlrpc_c::value_boolean(false);
return;
ADMIN * admin;
-if (admins->FindAdmin(adminInfo.admin, &admin))
+if (admins->Find(adminInfo.admin, &admin))
{
*retvalPtr = xmlrpc_c::value_boolean(false);
return;
USER_PTR u;
-if (users->FindByName(login, &u))
+if (!users->FindByName(login, &u))
{
users->Del(login, admin);
*retvalPtr = xmlrpc_c::value_boolean(true);
ADMIN * admin;
-if (admins->FindAdmin(adminInfo.admin, &admin))
+if (admins->Find(adminInfo.admin, &admin))
{
*retvalPtr = xmlrpc_c::value_boolean(false);
return;
ADMIN * admin;
-if (admins->FindAdmin(adminInfo.admin, &admin))
+if (admins->Find(adminInfo.admin, &admin))
{
*retvalPtr = xmlrpc_c::value_boolean(false);
return;
ADMIN * admin;
-if (admins->FindAdmin(adminInfo.admin, &admin))
+if (admins->Find(adminInfo.admin, &admin))
{
*retvalPtr = xmlrpc_c::value_boolean(false);
return;
ADMIN * admin;
-if (admins->FindAdmin(adminInfo.admin, &admin))
+if (admins->Find(adminInfo.admin, &admin))
{
*retvalPtr = xmlrpc_c::value_boolean(false);
return;
login,
store))
{
+ u->ResetNextTariff();
u->WriteConf();
*retvalPtr = xmlrpc_c::value_boolean(true);
return;