Skip to content

User Management Commands

Complete reference for user management console commands.

app:user:create

Create a new user with email, password, and optional details.

Usage

bash
php bin/console app:user:create <email> <password> [options]

Arguments

  • email (required) - User email address
  • password (required) - User password

Options

  • --name=NAME - User full name
  • --role=ROLE - User roles (can be used multiple times)
  • --street=STREET - Street address
  • --postal-code=CODE - Postal code
  • --city=CITY - City name
  • --country=COUNTRY - Country name

Examples

bash
# Basic customer
php bin/console app:user:create customer@example.com password123

# Supplier with full details
php bin/console app:user:create supplier@acme.com pass123 \
  --name="Acme Corp" \
  --role=ROLE_SUPPLIER \
  --street="123 Business St" \
  --city="Amsterdam" \
  --postal-code="1000AA" \
  --country="Netherlands"

# Admin with multiple roles
php bin/console app:user:create admin@example.com admin123 \
  --role=ROLE_ADMIN \
  --role=ROLE_SUPPLIER

app:user:update

Update an existing user's information.

Usage

bash
php bin/console app:user:update <identifier> [options]

Arguments

  • identifier (required) - User email or ID

Options

  • --email=EMAIL - New email address
  • --password=PASS - New password
  • --name=NAME - Full name
  • --street=STREET - Street address
  • --postal-code=CODE - Postal code
  • --city=CITY - City
  • --country=COUNTRY - Country
  • --notifications=BOOL - Enable push notifications (true/false)
  • --email-notifications=BOOL - Enable email notifications (true/false)

Examples

bash
# Update name and city
php bin/console app:user:update user@example.com \
  --name="Jane Smith" \
  --city="Rotterdam"

# Change password
php bin/console app:user:update user@example.com \
  --password=newpassword123

# Disable notifications
php bin/console app:user:update user@example.com \
  --notifications=false \
  --email-notifications=false

app:user:roles

Manage user roles (add, remove, or set).

Usage

bash
php bin/console app:user:roles <identifier> [options]

Options

  • --add=ROLE - Add role(s)
  • --remove=ROLE - Remove role(s)
  • --set=ROLE - Set roles (replaces all)
  • --list - Just list current roles

Available Roles

  • ROLE_USER - Default user (automatically added)
  • ROLE_SUPPLIER - Supplier/vendor role
  • ROLE_ADMIN - Administrator role

Examples

bash
# Add supplier role
php bin/console app:user:roles user@example.com --add=ROLE_SUPPLIER

# Remove role
php bin/console app:user:roles user@example.com --remove=ROLE_SUPPLIER

# Set roles (replace all)
php bin/console app:user:roles user@example.com --set=ROLE_ADMIN

# List roles
php bin/console app:user:roles user@example.com --list

app:user:show

Display detailed information about a user.

Usage

bash
php bin/console app:user:show <identifier>

Examples

bash
# Show by email
php bin/console app:user:show user@example.com

# Show by ID
php bin/console app:user:show 42

app:users:list

List all users with optional filters.

Usage

bash
php bin/console app:users:list [options]

Options

  • --email=EMAIL - Filter by email (exact match)
  • --notifications-enabled=BOOL - Filter by notification status
  • --limit=NUM - Limit result count (default: 100)

Examples

bash
# List all users
php bin/console app:users:list

# Filter by email
php bin/console app:users:list --email=user@example.com

# List first 50 users
php bin/console app:users:list --limit=50

MyWarranties - Warranty Management System