Beispiel #1
0
int GeUser::modify_user(char* system, char* user, char* password,
    unsigned int priv, char* fullname, char* description, char* email,
    char* phone, char* sms)
{
  int sts;
  UserList* ul;

  SystemName* sn = new SystemName(system);
  sts = sn->parse();
  if (EVEN(sts)) {
    delete sn;
    return sts;
  }

  SystemList* sl = find_system(sn);
  delete sn;
  if (!sl)
    return USER__NOSUCHSYSTEM;

  ul = (UserList*)sl->find_user(user);
  if (!ul)
    return USER__NOSUCHUSER;
  ul->modify(password, priv, fullname, description, email, phone, sms);

  return USER__SUCCESS;
}