Hi Ivan,

Ivan Warren ha scritto:
> When an installation doesn't use or no longer has the default wordpress
> administrative user, the database upgrade cannot be initiated because
> the upgrade.php script checks if the current logged in user id is '1'
> instead of checking whether the logged in user has the 'administrator'
> role or capability.

Why an installation shouldn't have the default wordpress admin user?

> The symptom is that invoking the wp-admin/upgrade.php URL invariably
> redirects to wp-login.php?upgrade with the 'Upgrade is needed, please
> log in with the admin account.' yellow box message even if the user is
> an administrator but is not the 'default' wordpress administrator.
> 
> One possible fix would be to invoke "current_user_can('administrator')"
> if it exists and the current user ID isn't 1 (since '1' is always the
> administrator, and a non '1' administrator implies capabilities exist in
> the wp table).
> 

Unfortunately "current_user_can('administrator')" doesn't work.


Cheers,
Giuseppe.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to