I suggest taking a full backup of your database first, via phpMyAdmin's Export tool. Be sure to get both Structure and Data (default settings usually work; just be sure you are looking at a list of tables when you click Export). Save the file for safekeeping.
The below will
not affect what group/list has access to what sections of your site, or who is a member of which groups -- it only resets the actual Viewlevels and Groups themselves to default. It doesn't sound like your site could get much more broken, but in all actuality, it could -- so be darn sure you have a good database backup!
Next you need to make note of the table prefixes you are using. This is the (hopefully random) sequence of characters at the beginning of every table name.
Next, truncate the *_usergroups table (meaning drop all its rows but leave the table itself intact).
Next, run this in your SQL window -- be sure to replace "YOURPREFIX" with your table prefix.
Code: Select all
INSERT INTO `YOURPREFIX_usergroups` (`id`, `parent_id`, `lft`, `rgt`, `title`) VALUES
(1, 0, 1, 18, 'Public'),
(2, 1, 8, 15, 'Registered'),
(3, 2, 9, 14, 'Author'),
(4, 3, 10, 13, 'Editor'),
(5, 4, 11, 12, 'Publisher'),
(6, 1, 4, 7, 'Manager'),
(7, 6, 5, 6, 'Administrator'),
(8, 1, 16, 17, 'Super Users'),
(9, 1, 2, 3, 'Guest');
Now truncate YOURPREFIX_viewlevels. Then replace YOURPREFIX below with your prefix, and paste into the SQL tool again:
Code: Select all
INSERT INTO `YOURPREFIX_viewlevels` (`id`, `title`, `ordering`, `rules`) VALUES
(1, 'Public', 0, '[1]'),
(2, 'Registered', 1, '[6,2,8]'),
(3, 'Special', 2, '[6,3,8]'),
(5, 'Guest', 0, '[9]'),
(6, 'Super Users', 0, '[8]');
Be careful and you'll be fine.