Index: uc_users.py
===================================================================
--- uc_users.py	(revision 527c0976508c7d2fad14e9180bcf1a211d5f18af)
+++ uc_users.py	(revision 95cf703d2ef8f7abf8a3684935be560cdf73467f)
@@ -3,5 +3,5 @@
 import bcrypt
 
-from db import get_connection, get_transaction, pick_from_list
+from db import get_connection, pick_from_list
 
 
@@ -40,5 +40,14 @@
         return
 
-    # Step 3: Enter password
+    # Step 3: Check email uniqueness
+    with get_connection() as conn:
+        with conn.cursor() as cur:
+            cur.execute("SELECT COUNT(*) FROM users WHERE email = %s", (email,))
+            exists = cur.fetchone()[0]
+    if exists > 0:
+        print(f"\n  ERROR: A user with email '{email}' already exists.")
+        return
+
+    # Step 4: Enter password
     password = getpass.getpass("  Initial password: ").strip()
     if not password:
@@ -50,28 +59,22 @@
         return
 
-    # Step 4: Hash password
+    # Step 5: Hash and insert
     hashed = bcrypt.hashpw(password.encode(), bcrypt.gensalt()).decode()
 
-    # Step 5: Transaction — check email uniqueness + insert atomically
-    # This prevents a race condition where two users register with the
-    # same email simultaneously (one check passes, both insert).
+    conn = get_connection()
     try:
-        with get_transaction() as conn:
-            with conn.cursor() as cur:
-                cur.execute("SELECT COUNT(*) FROM users WHERE email = %s", (email,))
-                if cur.fetchone()[0] > 0:
-                    raise ValueError(f"A user with email '{email}' already exists.")
+        with conn.cursor() as cur:
+            cur.execute(
+                """
+                INSERT INTO users (first_name, last_name, email, password, type_id)
+                VALUES (%s, %s, %s, %s, %s)
+                RETURNING user_id, first_name, last_name, email
+                """,
+                (first_name, last_name, email, hashed, type_id),
+            )
+            result = cur.fetchone()
+        conn.commit()
 
-                cur.execute(
-                    """
-                    INSERT INTO users (first_name, last_name, email, password, type_id)
-                    VALUES (%s, %s, %s, %s, %s)
-                    RETURNING user_id, first_name, last_name, email
-                    """,
-                    (first_name, last_name, email, hashed, type_id),
-                )
-                result = cur.fetchone()
-
-        # Transaction committed automatically — Step 6: Confirmation
+        # Step 6: Confirmation
         print(f"\n  User created successfully!")
         print(f"  User ID:  {result[0]}")
@@ -79,6 +82,7 @@
         print(f"  Email:    {result[3]}")
         print(f"  Role:     {role_name}")
-    except ValueError as e:
-        print(f"\n  ERROR: {e}")
     except Exception as e:
+        conn.rollback()
         print(f"\n  Error creating user: {e}")
+    finally:
+        conn.close()
