## User Management Panel Help

This guide covers all features, options, and best practices for managing users, roles, and groups in the Style Score Admin User Management panel.

##### Introduction

The User Management panel is the central hub for managing all user accounts, roles, and groups in the system. Only users with admin or super admin roles can access this panel. Here, you can add, edit, or remove users, assign roles, manage user groups, and control permissions.

##

- Add New User: Create a new user with full name, username, email, phone, password, role, and group assignment. Only roles you are allowed to create will be available.
- Edit User: Update user details, change role, activate/deactivate, or add notes. You cannot edit users with higher privileges than your own.
- Delete User: Remove a user account. You cannot delete your own account or a super admin (unless you are a super admin).
- Group Management: Create, edit, and delete user groups. Assign users to groups and manage group membership and roles within groups.
- Role & Permission Management: View statistics for each role, see the role hierarchy, and understand what each role can do.
- Quick Actions: Activate/deactivate users, view user details, and manage group members directly from the panel.
- Statistics: See total users, active users, groups, and role distribution at a glance.

##

Who can access the User Management panel?
  Only users with admin or super admin roles.
How do I add a new user?
  Click the Add New User button, fill in the required fields, select a role and groups, and submit. The username must be unique.
Can I assign any role to a new user?
  No. You can only assign roles that your own role is allowed to create. For example, admins cannot create super admins.
How do I activate or deactivate a user?
  Use the toggle in the Edit User modal. Deactivated users cannot log in.
Can I delete my own account?
  No. For security, you cannot delete your own account from the system.
How do I manage user groups?
  Go to the Groups tab. You can create, edit, and view groups, and manage group members.
What happens if I try to add a user with an existing username or email?
  The system will show an error and prevent duplicate accounts.
How do I view user details?
  Click on a user to open the details modal, which shows all profile information and group memberships.
How do I assign a user to a group?
  Use the Add Member to Group modal in the Groups tab, or select groups when creating/editing a user.
What is the difference between user roles and group roles?
  User roles define system-wide permissions. Group roles (member, admin, moderator) define permissions within a group.
Can I change a user's password?
  Currently, password changes are only available at user creation. For password resets, use the dedicated password reset function (if available).
What if I see a database error?
  Check your database connection and table structure. Contact a super admin if the problem persists.

##

- Cannot access panel: Make sure you are logged in as an admin or super admin.
- Form not submitting: Check for required fields and unique username/email.
- Database errors: Ensure all required tables exist and your database connection is active.
- Group or user not updating: Try refreshing the page or clearing your browser cache.
- Role assignment issues: You can only assign roles that your own role is allowed to create.
- Still need help? Contact your system administrator or super admin for further assistance.

##### Best Practices

- Always double-check user roles before assigning or editing accounts.
- Use groups to organize users for easier management and permissions control.
- Keep user information up to date, especially email and phone for notifications.
- Deactivate users instead of deleting if you want to preserve their history.
- Regularly review role statistics to ensure proper access control.