Control which icon packs each active user can access.
Pick a user to view and toggle icon access.
-- 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;