CRM-15023 - Fatal errors thrown on Event Info, registration, Contribution Pages
authorkcristiano <kcristiano@tadpole.cc>
Tue, 22 Jul 2014 01:33:47 +0000 (21:33 -0400)
committerkcristiano <kcristiano@tadpole.cc>
Tue, 22 Jul 2014 01:33:47 +0000 (21:33 -0400)
Simple workaround to ensure that pluggable.php is loaded before we check
capabilities in WordPress

CRM/Core/Permission/WordPress.php

index e0f0acb77680bd83cfc0edc8c4de696bf45956c6..dac689daaf037043e6ef8224dc2598aba18f91b8 100644 (file)
@@ -46,6 +46,7 @@ class CRM_Core_Permission_WordPress extends CRM_Core_Permission_Base {
    * @access public
    */
   function check($str) {
+    require_once ABSPATH . WPINC . '/pluggable.php';
     // Generic cms 'administer users' role tranlates to 'administrator' WordPress role
     $str = $this->translatePermission($str, 'WordPress', array(
       'administer users' => 'administrator',