# User Management Module

## Purpose
Manages user lifecycle including creation, modification, role assignment, and permission control. Provides hierarchical user role system with 13 distinct roles.

## Key Files
- `app/Http/Controllers/UserManagement/CreateUserControllerUltimate.php` - User creation controller
- `app/Http/Controllers/Pages/UserModifyAdminPageController.php` - Admin user management controller
- `app/Http/Controllers/Pages/UserListPageController.php` - User list controller
- `app/Enums/UserTypes.php` - User role enumeration

## Public APIs
- `CreateUser()` - Create new user with validation
- `Response_ListChildrenofCurrentUser()` - Get user's children
- `Response_UserDetails()` - Get user details by ID
- `Response_DisableUser()` / `EnableUser()` / `DeleteUser()`
- `listAllUserTypesforSelectHTML()` - Get all user types for dropdown

## Dependencies
- `App\Enums\UserActions` - Permission actions
- `App\Http\Controllers\Helpers\Permissions\UserPermissions` - Role permissions

## Important Behavior
- Validates mobile number and username uniqueness
- Creates users with encrypted password
- Supports hierarchical user structure (parent/children)
- Role assignment via `Response_ChangeUserRoles()`
- Permissions checked via `canDo()` method on User model