From: benjamin Date: Sat, 2 Dec 2023 18:29:37 +0000 (+0000) Subject: standalone bootstrap script fixes X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8419738c0735550371a1456a85fecb659179a715;p=civicrm-core.git standalone bootstrap script fixes --- diff --git a/CRM/Utils/System/Standalone.php b/CRM/Utils/System/Standalone.php index d7315f1ddc..c4828c1855 100644 --- a/CRM/Utils/System/Standalone.php +++ b/CRM/Utils/System/Standalone.php @@ -313,15 +313,13 @@ class CRM_Utils_System_Standalone extends CRM_Utils_System_Base { if (!isset($runOnce)) { $runOnce = TRUE; - return TRUE; } - - $root = rtrim($this->cmsRootPath(), '/' . DIRECTORY_SEPARATOR); - if (empty($root) || !is_dir($root) || !chdir($root)) { - return FALSE; + else { + return TRUE; } - require_once $root . '/../vendor/autoload.php'; /* assumes $root to be the _web_ root path, not the project root path. */ + global $civicrm_paths; + require_once $civicrm_paths['civicrm.vendor']['path'] . '/autoload.php'; // seems like we've bootstrapped drupal $config = CRM_Core_Config::singleton(); @@ -352,7 +350,7 @@ class CRM_Utils_System_Standalone extends CRM_Utils_System_Base { // if given username we expect a correct password. $user = $security->loadUserByName($params['name']); if ($user) { - if (!$security->checkPassword($params['pass'], $user['password'] ?? '')) { + if (!$security->checkPassword($params['pass'], $user['hashed_password'] ?? '')) { return FALSE; } }