User Management
Complete guide to managing users in LaraDashboard including creating users, assigning roles, managing permissions, and user impersonation.
User Management
LaraDashboard provides comprehensive user management with role-based access control (RBAC), allowing you to manage team members, assign permissions, and control access to features.
User Overview
Accessing User Management
Navigate to Users in the sidebar to access:
- All Users - View and manage all users
- Add New - Create a new user
- Roles & Permissions - Manage access control
User List Features
The user list provides:
| Feature | Description |
|---|---|
| Search | Search by name or email |
| Filter | Filter by role, status |
| Sort | Sort by any column |
| Bulk Actions | Delete multiple users |
| Pagination | Configurable items per page |
Creating Users
Via Admin Panel
- Navigate to Users → Add New
- Fill in required fields:
First Name: John
Last Name: Doe
Email: john@example.com
Password: ********
Confirm Password: ********
Role: Select role
-
Optional fields:
- Profile photo
- Phone number
- Bio/Description
- Custom fields (if configured)
-
Click Create User
User Options
| Option | Description |
|---|---|
| Send Welcome Email | Email credentials to user |
| Require Password Change | Force password reset on first login |
| Email Verified | Mark email as pre-verified |
Validation Rules
- Email - Must be unique and valid format
- Password - Minimum 8 characters, mixed case recommended
- First/Last Name - Required, 2-255 characters
Editing Users
Access User Edit
- Go to Users → All Users
- Click on a user name, or
- Click Edit in the actions dropdown
Editable Fields
- Personal information (name, email)
- Password (optional update)
- Role assignment
- Profile photo
- Additional metadata
Password Updates
When updating passwords:
- Leave password fields empty to keep existing
- Enter new password in both fields to change
- User will be notified if email notification is enabled
User Profiles
Profile Information
Each user has:
- Avatar - Profile photo with Gravatar fallback
- Personal Info - Name, email, bio
- Role & Permissions - Assigned role
- Activity - Login history, recent actions
- Metadata - Custom fields
User Metadata
Store additional information using the user_meta system:
// Store metadata
$user->setMeta('department', 'Engineering');
$user->setMeta('employee_id', 'EMP001');
// Retrieve metadata
$department = $user->getMeta('department');
Role Management
Default Roles
LaraDashboard includes these default roles:
| Role | Description | Typical Permissions |
|---|---|---|
| Super Admin | Full system access | Everything |
| Admin | Administrative access | Users, Content, Settings |
| Editor | Content management | Posts, Pages, Media |
| Author | Own content only | Create/Edit own posts |
| Subscriber | Basic access | View only |
Creating Roles
- Navigate to Users → Roles & Permissions
- Click Add New Role
- Enter role details:
Name: Content Manager
Description: Manages all published content
- Select permissions
- Click Create Role
Editing Roles
- Go to Roles & Permissions
- Click on the role name
- Modify name, description, or permissions
- Click Update Role
Warning: Modifying roles affects all users with that role immediately.
Deleting Roles
- Ensure no users are assigned to the role
- Click Delete on the role
- Confirm deletion
Note: System roles (Super Admin) cannot be deleted.
Permission System
Permission Structure
Permissions follow a hierarchical structure:
users
├── users.view
├── users.create
├── users.edit
├── users.delete
└── users.edit_own
posts
├── posts.view
├── posts.create
├── posts.edit
├── posts.delete
├── posts.edit_own
└── posts.publish
settings
├── settings.view
└── settings.edit
modules
├── modules.view
├── modules.install
└── modules.delete
Permission Groups
Permissions are organized into groups:
| Group | Description |
|---|---|
| Users | User management permissions |
| Roles | Role management permissions |
| Posts | Content management |
| Pages | Page management |
| Media | Media library access |
| Settings | System configuration |
| Modules | Module management |
Assigning Permissions
To Roles
- Edit the role
- Check/uncheck permissions
- Save changes
Directly to Users
// In code, for special cases
$user->givePermissionTo('posts.publish');
$user->revokePermissionTo('posts.delete');
Checking Permissions
In controllers and views:
// In controller
if ($user->can('posts.create')) {
// Allow action
}
// In Blade template
@can('posts.create')
<button>Create Post</button>
@endcan
User Impersonation
What is Impersonation?
Impersonation allows administrators to log in as another user without knowing their password. Useful for:
- Debugging user-specific issues
- Verifying permissions
- Providing support
How to Impersonate
- Go to Users → All Users
- Find the target user
- Click Actions → Login As
- You're now logged in as that user
Switching Back
When impersonating, you'll see a banner:
You are currently logged in as John Doe. [Switch Back]
Click Switch Back to return to your account.
Impersonation Restrictions
- Only Super Admins can impersonate
- Cannot impersonate other Super Admins
- All impersonation sessions are logged
- Original session is preserved
Audit Trail
Impersonation events are logged:
[2024-01-15 10:30:00] Admin (admin@example.com) started impersonating User (user@example.com)
[2024-01-15 10:35:00] Admin (admin@example.com) stopped impersonating User (user@example.com)
Bulk Operations
Selecting Users
- Click checkbox to select individual users
- Click header checkbox to select all on page
- Use shift+click to select range
Available Bulk Actions
| Action | Description |
|---|---|
| Delete | Remove selected users |
| Change Role | Assign new role to selected |
| Export | Download user data |
| Send Email | Email selected users |
Performing Bulk Actions
- Select users
- Choose action from dropdown
- Click Apply
- Confirm action
User Activity
Activity Logging
All user actions are logged:
- Login/logout events
- Content changes
- Setting modifications
- Permission changes
Viewing Activity
- Navigate to user profile
- Click Activity tab
- View chronological action list
Activity Details
Each log entry shows:
- Action type (created, updated, deleted)
- Affected resource
- Timestamp
- IP address (if configured)
Email Verification
Enabling Verification
Email verification is controlled in settings:
- Go to Settings → Authentication
- Enable Require Email Verification
- Save settings
Verification Flow
- User registers or is created
- Verification email is sent
- User clicks verification link
- Account is activated
Resending Verification
Users can resend verification emails:
- Login attempt shows verification notice
- Click Resend Verification Email
- Check inbox for new email
Admin Override
Admins can manually verify users:
- Edit user
- Check Email Verified
- Save user
Password Management
Password Requirements
Default requirements:
- Minimum 8 characters
- Configurable complexity rules
Password Reset
User-Initiated
- Click Forgot Password on login
- Enter email address
- Receive reset link via email
- Set new password
Admin-Initiated
- Edit user
- Enter new password
- Optionally send notification
- Save user
Force Password Change
Require password change on next login:
- Edit user
- Enable Require Password Change
- Save user
User Export
Exporting User Data
- Go to Users → All Users
- Click Export button
- Select format (CSV, Excel, PDF)
- Choose fields to include
- Download file
GDPR Compliance
For individual user data export:
- View user profile
- Click Export Data
- Download complete user data package
Troubleshooting
User Cannot Login
- Check if account is active
- Verify email is confirmed (if required)
- Reset password
- Check for IP restrictions
Permission Issues
- Verify user's role
- Check role's permissions
- Clear permission cache:
php artisan permission:cache-reset
Missing Users
- Check filters (role, status)
- Search by email directly
- Check soft deletes (if enabled)
Best Practices
Security
- Use strong password requirements
- Enable email verification
- Review permissions regularly
- Monitor login activity
- Enable 2FA (if available)
Organization
- Use meaningful role names
- Document custom permissions
- Regularly audit user access
- Remove inactive accounts
Performance
- Paginate large user lists
- Cache permission checks
- Index searchable fields
Next Steps
- Content Management - Manage posts and pages
- Media Library - Upload and manage files
- Settings - Configure system settings