Manage User Icons

Control which icon packs each active user can access.

1. Select Active User
Changing the user refreshes icon permissions automatically.
2. Icon Permissions
0 icons

Pick a user to view and toggle icon access.

SQL Snippets Used
-- Load active users
SELECT UserID, UserName FROM tblUser WHERE Active = 1 ORDER BY UserName;

-- Bootstrap user/icon rows on first visit
INSERT INTO tblUserIcons (UserID, IconID, Allowed, AddBy, AddOn)
SELECT :userId, IconID, 0, 'SYSTEM', NOW() FROM tblIcons;

-- Fetch icons with current permissions
SELECT i.IconID, i.IconName, i.Active, IFNULL(ui.Allowed, 0) AS Allowed
FROM tblIcons i
LEFT JOIN tblUserIcons ui ON ui.IconID = i.IconID AND ui.UserID = :userId;

-- Update a single permission
UPDATE tblUserIcons
SET Allowed = :allowed, AddBy = :admin, AddOn = NOW()
WHERE UserID = :userId AND IconID = :iconId;

Processing...