Merge pull request #2547 from davecivicrm/CRM-14249
[civicrm-core.git] / CRM / Utils / SoapServer.php
index a0c39fedf7d019b7d94e98d9b3f1fd7d28b60cb6..f266419b7b6cf3696f5c9fc5afbfe3024ee99b4b 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.4                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2013                                |
  +--------------------------------------------------------------------+
@@ -125,11 +125,12 @@ class CRM_Utils_SoapServer {
   public function authenticate($name, $pass, $loadCMSBootstrap = FALSE) {
     require_once (str_replace('_', DIRECTORY_SEPARATOR, $this->ufClass) . '.php');
 
-    if ($this->ufClass == 'CRM_Utils_System_Joomla' || $this->ufClass == 'CRM_Utils_System_WordPress'){
-      $loadCMSBootstrap = TRUE;
+    if ($this->ufClass == 'CRM_Utils_System_Joomla'){
+      $loadCMSBootstrap = true;
     }
-        
-    eval('$result =& ' . $this->ufClass . '::authenticate($name, $pass, $loadCMSBootstrap );');
+
+    $className = $this->ufClass;
+    $result =& $className::authenticate($name, $pass, $loadCMSBootstrap );
 
     if (empty($result)) {
       throw new SoapFault('Client', 'Invalid login');