Make WordPress Core

Opened 20 years ago

Closed 20 years ago

#2817 closed defect (bug) (fixed)

Admin password change problem

Reported by: markjaquith Owned by: markjaquith
Priority: normal Milestone:
Component: Administration Version: 2.1
Severity: normal Keywords: has-patch commit
Cc: Focuses:

Description

Reported by Owen Gray on wp-testers

After new install, while logged in as admin if I change admin's password
the meta_value for admin's wp_capabilities has been changed to "a:0:{}"
and the response to any attempt to view the admin area is: "You do not
have sufficient permissions to access this page."

I'm going to tackle this since it was my patch that caused this -- Mark

Attachments (1)

role_fix.diff (430 bytes ) - added by markjaquith 20 years ago.
fix for trunk

Download all attachments as: .zip

Change History (3)

@markjaquith
20 years ago

fix for trunk

#1 @markjaquith
20 years ago

  • Keywords has-patch commit added
  • Owner changed from anonymous to markjaquith
  • Status newassigned

Got it. Just need to make sure $role is set before updating it. When you edit your profile, $role won't be set, so it passes. Tested the uploaded patch and it works.

If anyone was bitten by this bug, do this:

UPDATE your_wp_usermeta SET meta_value = 'a:1:{s:13:"administrator";b:1;}' WHERE meta_key = 'your_wp_capabilities' AND user_id = '1';

Obviously, replace your_wp_usermeta with your usermeta table name, and "1" with the user ID affected. Then rm -rf your /wp-content/cache/ directory.

Thanks Owen Gray for the nice report!

#2 @ryan
20 years ago

  • Resolutionfixed
  • Status assignedclosed

(In [3865]) Make sure role is set when updating. Props Mark Jaquith. fixes #2817

Note: See TracTickets for help on using tickets.