@unchainedshop/core-users 4.8.12 → 4.8.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as bcrypt from 'bcryptjs';
|
|
2
|
-
import { generateDbFilterById, buildSortOptions, generateDbObjectId, insensitiveTrimmedRegexOperator, } from '@unchainedshop/mongodb';
|
|
2
|
+
import { generateDbFilterById, buildSortOptions, generateDbObjectId, insensitiveTrimmedRegexOperator, escapeRegexString, } from '@unchainedshop/mongodb';
|
|
3
3
|
import { UsersCollection, } from "../db/UsersCollection.js";
|
|
4
4
|
import { emit, registerEvents } from '@unchainedshop/events';
|
|
5
5
|
import { systemLocale, SortDirection, sha256 } from '@unchainedshop/utils';
|
|
@@ -588,7 +588,7 @@ export const configureUsersModule = async (moduleInput) => {
|
|
|
588
588
|
},
|
|
589
589
|
markDeleted: async (userId) => {
|
|
590
590
|
await db.collection('sessions').deleteMany({
|
|
591
|
-
session:
|
|
591
|
+
session: { $regex: `"user(Id)?":"${escapeRegexString(userId)}"` },
|
|
592
592
|
});
|
|
593
593
|
const user = await Users.findOneAndUpdate({ _id: userId }, {
|
|
594
594
|
$set: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unchainedshop/core-users",
|
|
3
3
|
"description": "User management module for the Unchained Engine with authentication support",
|
|
4
|
-
"version": "4.8.
|
|
4
|
+
"version": "4.8.14",
|
|
5
5
|
"main": "lib/users-index.js",
|
|
6
6
|
"types": "lib/users-index.d.ts",
|
|
7
7
|
"type": "module",
|