srtill admin cant change password, what other auth method could we use?
This commit is contained in:
@@ -57,7 +57,6 @@ export async function updateUser(
|
||||
const userId = session.user.id;
|
||||
|
||||
try {
|
||||
// Check if another user with the same email exists
|
||||
const existingUserStmt = db.prepare('SELECT id FROM users WHERE email = ? AND id != ?');
|
||||
const existingUser = existingUserStmt.get(email, userId);
|
||||
|
||||
@@ -66,7 +65,6 @@ export async function updateUser(
|
||||
}
|
||||
|
||||
if (password && password.trim().length > 0) {
|
||||
// In a real app, you would hash the password here
|
||||
const stmt = db.prepare(
|
||||
'UPDATE users SET name = ?, email = ?, password = ? WHERE id = ?'
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user