Branch: Tag:

2017-11-21

2017-11-21 11:31:47 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Core: userlist() now survives user dbs without list_users().

Fixes eg ftp directory listings when using the userfs module in
combination with user databases that don't implement list_users().

1:   // A vitual server's main configuration   // Copyright © 1996 - 2000, Roxen IS. - constant cvs_version = "$Id: configuration.pike,v 1.435 2001/06/13 13:45:23 per Exp $"; + constant cvs_version = "$Id$";   #include <module.h>   #include <module_constants.h>   #include <roxen.h>
800:   //! databases require it (such as the htaccess database)   {    array(string) list = ({}); -  foreach( user_databases(), UserDB m ) +  foreach( user_databases(), UserDB m ) { +  if (!m->list_users) continue;    list |= m->list_users(id); -  +  }    return list;   }