1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-12-26 13:38:52 +00:00

Can delete an account

This commit is contained in:
Pierre HUBERT 2020-04-18 12:20:08 +02:00
parent 5ba6362c78
commit 59825401b5

View File

@ -19,6 +19,7 @@ import { NotificationsHelper } from "./NotificationsHelper";
import { AccountImageHelper } from "./AccountImageHelper";
import { BackgroundImageHelper } from "./BackgroundImageHelper";
import { EventsHelper } from "./EventsHelper";
import { CustomEmojisHelper } from "./CustomEmojisHelper";
/**
* Account helper
@ -484,7 +485,7 @@ export class AccountHelper {
*/
public static async Delete(userID: number) {
/*// Delete all groups memberships
// Delete all groups memberships
await GroupsHelper.DeleteAllUsersGroups(userID);
// Delete all user comments
@ -523,13 +524,16 @@ export class AccountHelper {
// Delete user background image
await BackgroundImageHelper.Delete(userID);
// TODO : Delete custom user emojies
// Delete custom user emojies
await CustomEmojisHelper.DeleteAllUser(userID);
// Delete connections to all services
await this.DeleteAllUserLoginTokens(userID);
*/
// Delete user from the database
// WILL BE IMPLEMENTED LATER
await DatabaseHelper.DeleteRows(USER_TABLE, {
ID: userID
})
}
}