![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/domains/lavocat.ca/private_html/scripts/ |
const { PrismaClient } = require('@prisma/client');
const prisma = new PrismaClient();
async function checkLawyers() {
try {
console.log('🔍 Checking Lawyer Users...\n');
// Check all users with lawyer roles
const lawyers = await prisma.user.findMany({
where: {
role: {
in: ['LAWYER', 'ADMIN', 'SUPERADMIN']
}
},
select: {
id: true,
name: true,
email: true,
role: true,
title: true,
specialization: true,
isProfilePublic: true,
isVerified: true,
verificationStatus: true
},
orderBy: {
createdAt: 'desc'
}
});
console.log(`📊 Total Lawyer Users: ${lawyers.length}\n`);
if (lawyers.length === 0) {
console.log('❌ No lawyer users found in database');
console.log('💡 You may need to run a seed script to create lawyers');
return;
}
// Display each lawyer
lawyers.forEach((lawyer, index) => {
console.log(`👨⚖️ Lawyer ${index + 1}:`);
console.log(` ID: ${lawyer.id}`);
console.log(` Name: ${lawyer.name}`);
console.log(` Email: ${lawyer.email}`);
console.log(` Role: ${lawyer.role}`);
console.log(` Title: ${lawyer.title || 'N/A'}`);
console.log(` Specialization: ${lawyer.specialization || 'N/A'}`);
console.log(` Profile Public: ${lawyer.isProfilePublic}`);
console.log(` Verified: ${lawyer.isVerified}`);
console.log(` Verification Status: ${lawyer.verificationStatus || 'N/A'}`);
console.log('');
});
} catch (error) {
console.error('❌ Error checking lawyers:', error);
} finally {
await prisma.$disconnect();
}
}
checkLawyers();