+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2019 |
+ | Copyright CiviCRM LLC (c) 2004-2020 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2019
+ * @copyright CiviCRM LLC (c) 2004-2020
*/
/**
$dbDrupal = DB::connect($config->userFrameworkDSN);
if (DB::isError($dbDrupal)) {
- CRM_Core_Error::fatal("Cannot connect to drupal db via $config->userFrameworkDSN, " . $dbDrupal->getMessage());
+ throw new CRM_Core_Exception("Cannot connect to drupal db via $config->userFrameworkDSN, " . $dbDrupal->getMessage());
}
$strtolower = function_exists('mb_strtolower') ? 'mb_strtolower' : 'strtolower';
* Determine the native ID of the CMS user.
*
* @param string $username
- * @return int|NULL
+ * @return int|null
*/
public function getUfId($username) {
$user = user_load(['name' => $username]);
else {
$contactMatching++;
}
- if (is_object($match)) {
- $match->free();
- }
}
return [