mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Add PostgreSQL authentication backend (#9756)
* Add PostgreSQL authentication backend
This commit is contained in:
@@ -2187,6 +2187,14 @@ AuthDatabase *ServerEnvironment::openAuthDatabase(
|
||||
if (name == "sqlite3")
|
||||
return new AuthDatabaseSQLite3(savedir);
|
||||
|
||||
#if USE_POSTGRESQL
|
||||
if (name == "postgresql") {
|
||||
std::string connect_string;
|
||||
conf.getNoEx("pgsql_auth_connection", connect_string);
|
||||
return new AuthDatabasePostgreSQL(connect_string);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (name == "files")
|
||||
return new AuthDatabaseFiles(savedir);
|
||||
|
||||
|
Reference in New Issue
Block a user