當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CRM_Utils_System::authenticateAbort方法代碼示例

本文整理匯總了PHP中CRM_Utils_System::authenticateAbort方法的典型用法代碼示例。如果您正苦於以下問題:PHP CRM_Utils_System::authenticateAbort方法的具體用法?PHP CRM_Utils_System::authenticateAbort怎麽用?PHP CRM_Utils_System::authenticateAbort使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CRM_Utils_System的用法示例。


在下文中一共展示了CRM_Utils_System::authenticateAbort方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: run

function run()
{
    session_start();
    require_once '../civicrm.config.php';
    require_once 'CRM/Core/Config.php';
    $config = CRM_Core_Config::singleton();
    // this does not return on failure
    CRM_Utils_System::authenticateScript(TRUE);
    if (!CRM_Core_Permission::check('administer CiviCRM')) {
        CRM_Utils_System::authenticateAbort("User does not have required permission (administer CiviCRM).\n", TRUE);
    }
    encryptDB();
}
開發者ID:nielosz,項目名稱:civicrm-core,代碼行數:13,代碼來源:encryptDB.php

示例2: run

/**
 *
 * @package CRM
 * @copyright CiviCRM LLC (c) 2004-2016
 */
function run()
{
    session_start();
    require_once '../../civicrm.config.php';
    require_once 'CRM/Core/Config.php';
    $config = CRM_Core_Config::singleton();
    // this does not return on failure
    CRM_Utils_System::authenticateScript(TRUE);
    if (!CRM_Core_Permission::check('administer CiviCRM')) {
        CRM_Utils_System::authenticateAbort("User does not have required permission (administer CiviCRM).\n", TRUE);
    }
    require_once 'CRM/Utils/Migrate/ImportJSON.php';
    $import = new CRM_Utils_Migrate_ImportJSON();
    $import->run('/tmp/export.json');
}
開發者ID:nielosz,項目名稱:civicrm-core,代碼行數:20,代碼來源:importJSON.php

示例3: run

/**
 *
 * @package CRM
 * @copyright CiviCRM LLC (c) 2004-2016
 */
function run()
{
    session_start();
    require_once '../../civicrm.config.php';
    require_once 'CRM/Core/Config.php';
    $config = CRM_Core_Config::singleton();
    // this does not return on failure
    CRM_Utils_System::authenticateScript(TRUE);
    if (!CRM_Core_Permission::check('administer CiviCRM')) {
        CRM_Utils_System::authenticateAbort("User does not have required permission (administer CiviCRM).\n", TRUE);
    }
    require_once 'CRM/Core/BAO/ConfigSetting.php';
    $moveStatus = CRM_Core_BAO_ConfigSetting::doSiteMove();
    echo $moveStatus . '<br />';
    echo ts("If no errors are displayed above, the site move steps have completed successfully. Please visit <a href=\"{$config->userFrameworkBaseURL}\">your moved site</a> and test the move.");
}
開發者ID:kcristiano,項目名稱:civicrm-core,代碼行數:21,代碼來源:move.php

示例4: run

/**
 *
 * @package CRM
 * @copyright CiviCRM LLC (c) 2004-2016
 */
function run()
{
    session_start();
    require_once '../../civicrm.config.php';
    require_once 'CRM/Core/Config.php';
    $config = CRM_Core_Config::singleton();
    // this does not return on failure
    CRM_Utils_System::authenticateScript(TRUE);
    if (!CRM_Core_Permission::check('administer CiviCRM')) {
        CRM_Utils_System::authenticateAbort("User does not have required permission (administer CiviCRM).\n", TRUE);
    }
    require_once 'CRM/Utils/Migrate/Export.php';
    $export = new CRM_Utils_Migrate_Export();
    $export->build();
    CRM_Utils_System::download('CustomGroupData.xml', 'text/plain', $export->toXML());
}
開發者ID:kcristiano,項目名稱:civicrm-core,代碼行數:21,代碼來源:export.php

示例5: run

/**
 *
 * @package CRM
 * @copyright CiviCRM LLC (c) 2004-2016
 */
function run()
{
    session_start();
    if (!array_key_exists('file', $_GET) || empty($_GET['file'])) {
        echo "Please send an input file to import<p>";
        exit;
    }
    require_once '../../civicrm.config.php';
    require_once 'CRM/Core/Config.php';
    $config = CRM_Core_Config::singleton();
    // this does not return on failure
    CRM_Utils_System::authenticateScript(TRUE);
    if (!CRM_Core_Permission::check('administer CiviCRM')) {
        CRM_Utils_System::authenticateAbort("User does not have required permission (administer CiviCRM).\n", TRUE);
    }
    require_once 'CRM/Utils/Migrate/Import.php';
    $import = new CRM_Utils_Migrate_Import();
    $import->run($_GET['file']);
    echo "Import Done!";
}
開發者ID:nielosz,項目名稱:civicrm-core,代碼行數:25,代碼來源:import.php


注:本文中的CRM_Utils_System::authenticateAbort方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。