#!/usr/bin/env python
"""
Check loan officer staff status
"""
import os
import django

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'branch_system.settings')
django.setup()

from django.contrib.auth import get_user_model

User = get_user_model()

# Get the loan officer
loan_officer = User.objects.filter(email='loan_officer_ksm@example.com').first()

if not loan_officer:
    print("Loan officer not found")
    exit(1)

print(f"\n=== {loan_officer.get_full_name()} ===")
print(f"Email: {loan_officer.email}")
print(f"Role: {loan_officer.role}")
print(f"is_staff: {loan_officer.is_staff}")
print(f"is_superuser: {loan_officer.is_superuser}")
print(f"Branch: {loan_officer.branch.name if loan_officer.branch else 'No branch'}")
