Yes, I ran into this problem as well. I’m the s2Member developer for WordPress, and my plugin is broken by Maintenance Mode.
Please, please, please, remove the pluggable.php include call. A WordPress plugin should never force this file to be loaded ahead of others. ~Thanks. Otherwise, I’m a huge fan of your plugin!
The documentation even has an example how current_user_can is used properly:
http://codex.ww.wp.xz.cn/Adding_Administration_Menus
has this been fixed or is there a patch available for this problem?
A user recently reported this problem to me with my own plugin, Register Plus Redux. I wanted to hack together a fork of this plugin that fixes this issue, mwillberg, I don’t see the fix you mentioned on that page, can you clarify? I was considering nestling the include into the functions he uses current_user_can, to see if that would remotely help.
http://ww.wp.xz.cn/extend/plugins/register-plus-redux/
I did some heavy digging into the Maintenance Mode code and came up with the following changes to correct Maintenance Mode’s faux pas.
In maintenance-mode.php, comment out the following line (37):
if (!function_exists('wp_get_current_user')) require (ABSPATH . WPINC . '/pluggable.php');
Also in maintenance-mode.php, change the following line (632) from:
$myMaMo->ApplyMaintenanceMode();
To:
add_action('plugins_loaded', array($myMaMo, 'ApplyMaintenanceMode'));
So what we just did was remove the import of pluggable.php and delayed the initialization of Maintenance Mode until all other plugins are loaded (including pluggable). So no more jumping the gun!
http://radiok.info/blog/the-case-of-maintenance-mode/
Has been fixed in the meantime (plugin version 5.3), thanks to radiok:
http://ww.wp.xz.cn/extend/plugins/maintenance-mode/changelog/