当前位置: 首页>>代码示例>>PHP>>正文


PHP CRM_Utils_System::authenticateScript方法代码示例

本文整理汇总了PHP中CRM_Utils_System::authenticateScript方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Utils_System::authenticateScript方法的具体用法?PHP CRM_Utils_System::authenticateScript怎么用?PHP CRM_Utils_System::authenticateScript使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CRM_Utils_System的用法示例。


在下文中一共展示了CRM_Utils_System::authenticateScript方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: run

function run()
{
    session_start();
    require_once '../civicrm.config.php';
    require_once 'CRM/Core/Config.php';
    $config = CRM_Core_Config::singleton();
    require_once 'Console/Getopt.php';
    $shortOptions = "n:p:k:pre";
    $longOptions = array('name=', 'pass=', 'key=', 'prefix=');
    $getopt = new Console_Getopt();
    $args = $getopt->readPHPArgv();
    array_shift($args);
    list($valid, $dontCare) = $getopt->getopt2($args, $shortOptions, $longOptions);
    $vars = array('name' => 'n', 'pass' => 'p', 'key' => 'k', 'prefix' => 'pre');
    foreach ($vars as $var => $short) {
        ${$var} = NULL;
        foreach ($valid as $v) {
            if ($v[0] == $short || $v[0] == "--{$var}") {
                ${$var} = $v[1];
                break;
            }
        }
        if (!${$var}) {
            ${$var} = CRM_Utils_Array::value($var, $_REQUEST);
        }
        $_REQUEST[$var] = ${$var};
    }
    // this does not return on failure
    // require_once 'CRM/Utils/System.php';
    CRM_Utils_System::authenticateScript(TRUE, $name, $pass);
    //log the execution of script
    CRM_Core_Error::debug_log_message('NormalizePhone.php');
    // process all phones
    processPhones($config, $prefix);
}
开发者ID:FundingWorks,项目名称:civicrm-core,代码行数:35,代码来源:NormalizePhone.php

示例2: __construct

 function __construct()
 {
     $this->initialize();
     CRM_Utils_System::authenticateScript(TRUE);
     //log the execution of script
     CRM_Core_Error::debug_log_message('CiviReportMail.php');
 }
开发者ID:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:7,代码来源:CiviReportMail.php

示例3: 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);
    encryptDB();
}
开发者ID:hampelm,项目名称:Ginsberg-CiviDemo,代码行数:10,代码来源:encryptDB.php

示例4: sfs_bin_Utils_auth

function sfs_bin_Utils_auth()
{
    session_start();
    global $civicrm_root;
    require_once "{$civicrm_root}/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);
}
开发者ID:pzingg,项目名称:sfschool,代码行数:10,代码来源:Utils.php

示例5: __construct

 function __construct()
 {
     $config = CRM_Core_Config::singleton();
     //this does not return on failure
     require_once 'CRM/Utils/System.php';
     require_once 'CRM/Utils/Hook.php';
     CRM_Utils_System::authenticateScript(TRUE);
     //log the execution time of script
     CRM_Core_Error::debug_log_message('ParticipantProcessor.php');
 }
开发者ID:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:10,代码来源:ParticipantProcessor.php

示例6: authenticate

 /**
  * @param $user
  * @param $pass
  */
 function authenticate($user, $pass)
 {
     session_start();
     require_once 'CRM/Core/Config.php';
     $config =& CRM_Core_Config::singleton();
     // this does not return on failure
     // require_once 'CRM/Utils/System.php';
     //    CRM_Utils_System::authenticateScript( true );
     CRM_Utils_System::authenticateScript(TRUE, $user, $pass);
 }
开发者ID:FundingWorks,项目名称:civicrm-core,代码行数:14,代码来源:cli.php

示例7: __construct

 function __construct()
 {
     $config = CRM_Core_Config::singleton();
     // this does not return on failure
     require_once 'CRM/Utils/System.php';
     require_once 'CRM/Utils/Hook.php';
     CRM_Utils_System::authenticateScript(TRUE);
     $config->cleanURL = 1;
     //log the execution time of script
     CRM_Core_Error::debug_log_message('UpdatePledgeRecord.php');
 }
开发者ID:hguru,项目名称:224Civi,代码行数:11,代码来源:UpdatePledgeRecord.php

示例8: 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);
    // we now use DB locks on a per job basis
    processQueue();
}
开发者ID:ksecor,项目名称:civicrm,代码行数:11,代码来源:civimail.cronjob.php

示例9: 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);
    require_once 'CRM/Core/BAO/Setting.php';
    CRM_Core_BAO_Setting::doSiteMove();
    echo "Site Move Completed. Please visit <a href=\"{$config->userFrameworkBaseURL}\">your moved site</a> and test the move<p>";
}
开发者ID:bhirsch,项目名称:civicrm,代码行数:12,代码来源:siteMove.php

示例10: run

/**
 *
 * @package CRM
 * @copyright CiviCRM LLC (c) 2004-2012
 * $Id$
 *
 */
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);
    require_once 'CRM/Utils/Migrate/Export.php';
    $export = new CRM_Utils_Migrate_Export();
    $export->run();
}
开发者ID:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:19,代码来源:export.php

示例11: __construct

 function __construct()
 {
     $this->initialize();
     $config = CRM_Core_Config::singleton();
     require_once 'CRM/Utils/Request.php';
     require_once 'CRM/Core/PseudoConstant.php';
     require_once 'CRM/Contact/BAO/Contact.php';
     // this does not return on failure
     CRM_Utils_System::authenticateScript(TRUE);
     //log the execution time of script
     CRM_Core_Error::debug_log_message('UpdateGreeting.php');
 }
开发者ID:archcidburnziso,项目名称:civicrm-core,代码行数:12,代码来源:UpdateGreeting.php

示例12: run

/**
 *
 * @package CRM
 * @copyright CiviCRM LLC (c) 2004-2013
 * $Id$
 *
 */
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);
    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:hguru,项目名称:224Civi,代码行数:20,代码来源:export.php

示例13: 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);
    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:saurabhbatra96,项目名称:civicrm-core,代码行数:18,代码来源:move.php

示例14: 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

示例15: run

/**
 * A PHP cron script to run the outstanding and scheduled CiviMail jobs
 * initiated by Owen Barton from a mailing sent by Lobo to crm-mail
 *
 * The structure of the file is set to mimiic soap.php which is a stand-alone
 * script and hence does not have any UF issues. You should be able to run
 * this script using a web url or from the command line
 */
function run()
{
    session_start();
    if (!function_exists('drush_get_context')) {
        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);
    // we now use DB locks on a per job basis
    require_once 'CRM/Mailing/BAO/Mailing.php';
    CRM_Mailing_BAO_Mailing::processQueue();
}
开发者ID:hguru,项目名称:224Civi,代码行数:22,代码来源:civimail.cronjob.php


注:本文中的CRM_Utils_System::authenticateScript方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。