Ignore:
Timestamp:
01/17/10 19:21:11 (12 years ago)
Author:
alno
Message:

WebIf:

  • Feature "disabled" added for accounts. The Parameter can be set in webinterface and/or in oscam.user. Syntax "disabled=0|1". If parameter is set to 1 the user do not get ecm and in log you see "disabled". A value of 0 gives access back to the user.
  • The user setting table in Webif got a new additional TR Style "disabled"
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/monitor-improvement/oscam-config.c

    r1260 r1269  
    783783  if (!strcmp(token, "monlevel")) { account->monlvl=atoi(value); return; }
    784784  if (!strcmp(token, "caid")) { chk_caidtab(value, &account->ctab); return; }
     785  if (!strcmp(token, "disabled")) { account->disabled=atoi(value); return; }
    785786  /*
    786787   *  case insensitive
     
    11531154        fprintf_conf(f, CONFVARWIDTH, "user", "%s\n", account->usr);
    11541155        fprintf_conf(f, CONFVARWIDTH, "pwd", "%s\n", account->pwd);
     1156        fprintf_conf(f, CONFVARWIDTH, "disabled", "%d\n", account->disabled);
    11551157        struct tm * timeinfo = localtime (&account->expirationdate);
    11561158        char buf [80];
     
    12161218int init_userdb()
    12171219{
    1218   int tag=0, nr, nro, expired;
     1220  int tag=0, nr, nro, expired, disabled;
    12191221  //int first=1;
    12201222  FILE *fp;
     
    12771279  fclose(fp);
    12781280
    1279   for (expired=0, ptr=cfg->account; ptr;)
     1281  for (expired=0, disabled=0, ptr=cfg->account; ptr;)
    12801282  {
    12811283    if(ptr->expirationdate && ptr->expirationdate<time(NULL)) expired++;
     1284    if(ptr->disabled != 0) disabled++;
    12821285    ptr=ptr->next;
    12831286  }
    12841287
    1285   cs_log("userdb reloaded: %d accounts freed, %d accounts loaded, %d expired", nro, nr, expired);
     1288  cs_log("userdb reloaded: %d accounts freed, %d accounts loaded, %d expired, %d disabled", nro, nr, expired, disabled);
    12861289  return(0);
    12871290}
Note: See TracChangeset for help on using the changeset viewer.