<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.3 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
* This class handles all SOAP client requests.
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
* Class constructor. This caches the real user framework class locally,
* so we can use it for authentication and validation.
*
- * @param string $uf The userframework class
+ * @internal param string $uf The userframework class
*/
public function __construct() {
// any external program which call SoapServer is responsible for
/**
* Verify a SOAP key
*
- * @param string $key The soap key generated by authenticate()
+ * @param string $key The soap key generated by authenticate()
*
- * @return none
+ * @throws SoapFault
+ * @return void
* @access public
*/
public function verify($key) {
/**
* Authentication wrapper to the UF Class
*
- * @param string $name Login name
- * @param string $pass Password
+ * @param string $name Login name
+ * @param string $pass Password
*
+ * @param bool $loadCMSBootstrap
+ *
+ * @throws SoapFault
* @return string The SOAP Client key
* @access public
* @static
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');