Forum
user_role_privileges table is empty and can't login to the admin area
Hi,
I can no longer login to the cms area of my website. The website is a couple of years old and needs to be updated to the latest version of Perch. When I try to login I get a "sorry, those details are incorrect." message. However, the password is correct and actually passes activation, it just doesn't have login privs.
In looking at the database the perch2_user_role_privileges table exists but doesn't have any rows. Can you please tell me how to fix this? Thank you! Denise
Below is the diagnostic info:
Activation: success
SELECT * FROM perch2_users WHERE userEnabled='1' AND userUsername='deniseb' LIMIT 1
User exists, checking password.
Stronger password hash.
Password is ok.
UPDATE perch2_users SET userHash='xxxxxxxxxxxxleavingInfoOut', userLastLogin='2015-07-04 23:04:40' WHERE userID=1
SELECT p.privKey FROM perch2_users u, perch2_user_role_privileges rp, perch2_user_privileges p
WHERE u.roleID=rp.roleID AND rp.privID=p.privID AND u.userID=1
Looking up missing property roleMasterAdmin
SELECT roleMasterAdmin FROM perch2_users WHERE userID=1
Invalid query: Unknown column 'roleMasterAdmin' in 'field list'
User role does not have login privs
SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
That's very strange. I wonder what happened to your table.
As a workaround, find your row in the
perch2_users
table and set theuserMasterAdmin
column to1
.That will make you primary admin, which means the privs in your empty table won't be checked. (Primary admins get all privs automatically so we don't even check.)