@extends('layouts.app') @section('title', 'Edit User') @section('page-title', 'Edit User') @section('content') Update the user's account information, assigned role, status, or login credentials. {{-- Page Actions --}}
@can('users.view') View User @endcan Back
@csrf @method('PUT')
{{-- Header --}}

User Information

Update account information, role, status, and login credentials.

@if (auth()->id() === $user->id) Your Account @endif
{{-- Form --}}
{{-- Name --}}
@error('name')

{{ $message }}

@enderror
{{-- Email --}}
@error('email')

{{ $message }}

@enderror
{{-- Role --}}
@php $currentRole = old( 'role', $user->roles->first()?->name ); @endphp

Changing the role will replace the user's current role and permissions.

@error('role')

{{ $message }}

@enderror
{{-- Status --}}
{{-- Disabled form controls are not submitted. When editing your own account, preserve the current active status explicitly. --}} @if (auth()->id() === $user->id)

You cannot deactivate your own account.

@else

Inactive users should not be allowed to access the system.

@endif @error('is_active')

{{ $message }}

@enderror
{{-- Password Section --}}

Change Password

Leave both password fields blank to keep the current password.

{{-- Password --}}

Use at least 8 characters with uppercase, lowercase, and numbers.

@error('password')

{{ $message }}

@enderror
{{-- Password Confirmation --}}
{{-- Security Information --}}

Role-Based Access

This user's system permissions are inherited from the assigned role. To modify what the role can access, update its permissions from Role Management.

{{-- Super Admin Warning --}} @if ($user->hasRole('Super Admin'))

Super Admin Account

This account currently has the Super Admin role. The system prevents the final Super Admin account from losing administrative access.

@endif
{{-- Actions --}}
Cancel
{{-- Password Visibility --}} @endsection