Add user management system with approval workflow and role assignment
This commit is contained in:
@@ -23,6 +23,14 @@ export default defineEventHandler(async (event) => {
|
||||
})
|
||||
}
|
||||
|
||||
// Check if user is active
|
||||
if (user.active === false) {
|
||||
throw createError({
|
||||
statusCode: 403,
|
||||
message: 'Ihr Konto wurde noch nicht freigeschaltet. Bitte warten Sie auf die Bestätigung des Vorstands.'
|
||||
})
|
||||
}
|
||||
|
||||
// Verify password
|
||||
const isValid = await verifyPassword(password, user.password)
|
||||
if (!isValid) {
|
||||
|
||||
Reference in New Issue
Block a user