This commit is contained in:
parent
7f065f427f
commit
911fcae536
@ -266,8 +266,8 @@ class UserDatabase extends UserDatabaseInterface {
|
||||
const user = this._createUser({
|
||||
name
|
||||
});
|
||||
await this.#db.insertOne(this._userColllection, user.jsonPrivate);
|
||||
await user.setPassword(password);
|
||||
await this.#db.insertOne(this._userColllection, user.jsonPrivate);
|
||||
// await this.updateUser(user);
|
||||
if (!this.disableCache)
|
||||
this.cache.set(user.id, user);
|
||||
|
@ -91,6 +91,8 @@ class MariaDB {
|
||||
|
||||
async close () {
|
||||
this.logger.status(`Shutting down database connections`);
|
||||
if (!this.ready)
|
||||
return Promise.resolve();
|
||||
this.ready = false;
|
||||
if (this.activeQueries) {
|
||||
this.logger.info(`${this.activeQueries} active queries still running, letting them finish`);
|
||||
|
@ -49,7 +49,7 @@ class User extends AbstractUser {
|
||||
}
|
||||
|
||||
get passwordLoginEnabled () {
|
||||
return this._passwordHash !== null;
|
||||
return this.#passwordHash !== null;
|
||||
}
|
||||
|
||||
get avatar () {
|
||||
|
Loading…
Reference in New Issue
Block a user