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


PHP Auth::__construct方法代碼示例

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


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

示例1: __construct

 public function __construct($path = '')
 {
     parent::__construct($path);
     if ($path[1] == 'ajax') {
         //任意控製器的動作為ajax時, 執行ajax動作, 禁止輸出頁頭, 頁尾及數據庫訪問錯誤
         APP::$DB->printerror = false;
         //ajax數據庫訪問不打印錯誤信息
         $this->ajax['s'] = 1;
         //初始化ajax返回數據, s表示狀態
         $this->ajax['i'] = '';
         //i指ajax提示信息
         $this->ajax['d'] = '';
         //d指ajax返回的數據
         $this->json = new JSON();
         if (!$this->admin) {
             //管理員驗證不成功, 直接輸出ajax信息, 並終止ajax其它程序程序運行
             $this->ajax['i'] = "管理員授權錯誤! 請確認已成功登錄後台.";
             die($this->json->encode($this->ajax));
         }
     } else {
         if ($path[1] == 'logout') {
             $this->logout();
         }
         //無論哪個控製器, 隻要是logout動作, admin用戶退出
         if ($path[0] == 'online') {
             $this->s_page_header($path);
             //授權成功, 客服輸出頁頭
         } else {
             $this->page_header($path);
             //授權成功, 管理員輸出頁頭
         }
     }
 }
開發者ID:noikiy,項目名稱:meilala,代碼行數:33,代碼來源:class.Admin.php

示例2: __construct

	/**
	 * Constructor loads the user list into the class.
	 */
	public function __construct($config = array())
	{
		parent::__construct($config);

		// Load user list
		$this->_users = Arr::get($config, 'users', array());
	}
開發者ID:nevermlnd,項目名稱:cv,代碼行數:10,代碼來源:file.php

示例3: __construct

 public function __construct($options = array())
 {
     parent::__construct($options);
     if (empty(self::$_specialities)) {
         $m = $this->mongod();
         self::$_specialities = $m->get('specialities');
     }
 }
開發者ID:HLitmus,項目名稱:WebApp,代碼行數:8,代碼來源:doctor.php

示例4: __construct

 public function __construct($config = array())
 {
     parent::__construct($config);
     foreach ($config['services'] as $service => $config) {
         $class = 'Auth_Service_' . Jam::capitalize_class_name($service);
         $this->_services[$service] = new $class($config);
     }
 }
開發者ID:Konro1,項目名稱:pms,代碼行數:8,代碼來源:Jam.php

示例5: __construct

 /**
  * Constructor
  * 
  * @param object Auth_ContainerBase
  * @param array	further options Not used in the moment
  */
 public function __construct($container, $a_options = array())
 {
     $_POST['username'] = 'dummy';
     $_POST['password'] = 'dummy';
     parent::__construct($container, $a_options, '', false);
     $this->setSessionName("_authhttp" . md5(CLIENT_ID));
     $this->initAuth();
 }
開發者ID:arlendotcn,項目名稱:ilias,代碼行數:14,代碼來源:class.ilAuthECS.php

示例6: __construct

 /**
  * Constructor
  * 
  * @param object $container
  * @param array	further options Not used in the moment
  */
 public function __construct($a_container, $a_further_options = array())
 {
     global $PHPCAS_CLIENT;
     parent::__construct($a_container, $a_further_options, array($a_container, 'forceAuthentication'), true);
     $this->setSessionName("_authhttp" . md5(CLIENT_ID));
     $this->initAuth();
     if (is_object($PHPCAS_CLIENT) and $PHPCAS_CLIENT->isAuthenticated()) {
         $this->username = $PHPCAS_CLIENT->getUser();
     }
 }
開發者ID:arlendotcn,項目名稱:ilias,代碼行數:16,代碼來源:class.ilAuthCAS.php

示例7: __construct

 public function __construct($opts = [])
 {
     parent::__construct($opts);
     $start = RequestMethods::get('start', date('Y-m-d', strtotime("-1 day")));
     $end = RequestMethods::get('end', date('Y-m-d'));
     $user_id = RequestMethods::get("user_id", null);
     $this->start = $start;
     $this->end = $end;
     $this->user_id = $user_id;
 }
開發者ID:vNative,項目名稱:vnative,代碼行數:10,代碼來源:insight.php

示例8: __construct

 /**
  * Contructor
  * @return 
  * @param object $a_container
  * @param object $a_addition_options[optional]
  */
 public function __construct($a_container, $a_addition_options = array())
 {
     parent::__construct($a_container, $a_addition_options, array($this, 'callProvider'), true);
     $this->setSessionName("_authhttp" . md5(CLIENT_ID));
     $this->initAuth();
     $this->initSettings();
     if (isset($_GET['oid_check_status'])) {
         $_POST['username'] = 'dummy';
         $_POST['password'] = 'dummy';
     }
 }
開發者ID:arlendotcn,項目名稱:ilias,代碼行數:17,代碼來源:class.ilAuthOpenId.php

示例9: __construct

 public function __construct($userman, $freepbx)
 {
     parent::__construct($userman, $freepbx);
     $this->FreePBX = $freepbx;
     $config = $userman->getConfig("authMSADSettings");
     $this->host = $config['host'];
     $this->port = !empty($config['port']) ? $config['port'] : 389;
     $this->dn = $config['dn'];
     $this->domain = $config['domain'];
     $this->user = $config['username'];
     $this->password = $config['password'];
     $this->linkAttr = isset($config['la']) ? $config['la'] : '';
 }
開發者ID:casvcasv,項目名稱:userman,代碼行數:13,代碼來源:Msad.php

示例10: define

 function __construct()
 {
     parent::__construct();
     define('AMQP_DEBUG', false);
     //define('MQ_HOST', '115.29.188.246');
     //        define('MQ_PORT', 5672);
     //        define('MQ_USER', 'valsun_tran');
     //        define('MQ_PASS', 'tranabc');
     //        define('MQ_VHOST', 'valsun_tran');
     define('MQ_HOST', '192.168.200.198');
     define('MQ_PORT', 5672);
     define('MQ_USER', 'xiaojinhua');
     define('MQ_PASS', 'jinhua');
     define('MQ_VHOST', 'mq_vhost1');
 }
開發者ID:ohjack,項目名稱:newErp,代碼行數:15,代碼來源:publish.action.php

示例11: __construct

 /**
  * Constructor
  * 
  * @param string $username The username for authentication
  * @param string $password The password
  * @param boolean $autologin If the authentication is by autologin
  * @param string $token The token string
  */
 public function __construct($username, $password, $autologin, $token = "")
 {
     $config = \Centreon\Internal\Di::getDefault()->get('config');
     if (1 === $config->get('default', 'sso_enable', 0)) {
         if ('' !== $config->get('default', 'sso_header_username', '')) {
             $this->sso_username = $_SERVER[$config->get('default', 'sso_header_username', '')];
             $this->enable = true;
             if ($this->checkSsoClient()) {
                 $self->sso_mandatory = 1;
                 $username = $this->sso_username;
             }
         }
     }
     parent::__construct($username, $password, $autologin, $token);
 }
開發者ID:rk4an,項目名稱:centreon,代碼行數:23,代碼來源:Sso.php

示例12: __construct

 /**
  * This constructor initializes the class using the specified config information.
  *
  * @access public
  * @param mixed $config                     the config information to be used
  * @throws Throwable_Exception              indicates that error occurred when loading
  *                                          a configuration
  */
 public function __construct($config = NULL)
 {
     parent::__construct($config);
     if (isset($config['models'])) {
         if (isset($config['models']['role'])) {
             $this->models['role'] = $config['models']['role'];
         }
         if (isset($config['models']['user'])) {
             $this->models['user'] = $config['models']['user'];
         }
         if (isset($config['models']['token'])) {
             $this->models['token'] = $config['models']['token'];
         }
     }
     if (isset($config['columns'])) {
         if (isset($config['columns']['role_id'])) {
             $this->columns['role_id'] = $config['columns']['role_id'];
         }
         if (isset($config['columns']['role_name'])) {
             $this->columns['role_name'] = $config['columns']['role_name'];
         }
         if (isset($config['columns']['token'])) {
             $this->columns['token'] = $config['columns']['token'];
         }
         if (isset($config['columns']['user_id'])) {
             $this->columns['user_id'] = $config['columns']['user_id'];
         }
         if (isset($config['columns']['user_username'])) {
             $this->columns['user_username'] = $config['columns']['user_username'];
         }
         if (isset($config['columns']['user_email'])) {
             $this->columns['user_email'] = $config['columns']['user_email'];
         }
     }
     if (empty($config['login_with_email']) and empty($config['login_with_username'])) {
         throw new Throwable_Exception('Message: Unable to load configuration. Reason: A valid "login_with" setting must be set in you auth config file.');
     }
 }
開發者ID:ruslankus,項目名稱:invoice-crm,代碼行數:46,代碼來源:Leap.php

示例13: __construct

 public function __construct($container, $a_options = array())
 {
     parent::__construct($container, $a_options, '', false);
     $this->setSessionName("_authhttp" . md5(CLIENT_ID));
     $this->initAuth();
     /*
         	parent::__construct($container);
     
     if(isset($a_further_options['username']))
     {
     	$_POST['username'] = $a_further_options['username'];
     }
     if(isset($a_further_options['password']))
     {
     	$_POST['password'] = $a_further_options['password'];
     }
     
     $this->appendOption('sessionName',"_authhttp".md5(CLIENT_ID));
     $this->appendOption('sessionSharing',false);
     $this->initAuth();
     $this->initCallbacks();
     */
 }
開發者ID:arlendotcn,項目名稱:ilias,代碼行數:23,代碼來源:class.ilAuthSOAP.php

示例14: __construct

 /**
  * Contructor
  * @return 
  * @param object $a_container
  * @param object $a_addition_options[optional]
  */
 public function __construct($a_container, $a_addition_options = array())
 {
     global $lng;
     parent::__construct($a_container, $a_addition_options, '', false);
     $this->setSessionName("_authhttp" . md5(CLIENT_ID));
     $this->apache_settings = new ilSetting('apache_auth');
     if (defined('IL_CERT_SSO') && IL_CERT_SSO) {
         // DO NOT DELETE!!!
         // faking post values is REQUIRED to avoid canceling of the
         // startup routines
         // $_POST['username'] = 'xxx';
         $_POST['password'] = 'yyy';
         $_POST['sendLogin'] = '1';
         $_POST['auth_mode'] = AUTH_APACHE;
         $_POST['cmd[butSubmit]'] = 'Submit';
         if ($_POST['username'] != 'anonymous') {
             switch ($this->apache_settings->get('apache_auth_username_config_type')) {
                 case APACHE_AUTH_TYPE_DIRECT_MAPPING:
                     $_POST['username'] = $_SERVER[$this->apache_settings->get('apache_auth_username_direct_mapping_fieldname')];
                     break;
                 case APACHE_AUTH_TYPE_EXTENDED_MAPPING:
                     throw new ilException("APACHE_AUTH_TYPE_EXTENDED_MAPPING not yet implemented");
                 case APACHE_AUTH_TYPE_BY_FUNCTION:
                     include_once 'Services/AuthApache/classes/custom_username_func.php';
                     $_POST['username'] = ApacheCustom::getUsername();
                     break;
             }
         }
     }
     if (defined('IL_CERT_SSO') && IL_CERT_SSO && !$_POST['username']) {
         $_POST['username'] = '§invalid';
         $_POST['password'] = 'anonymous';
         $_SESSION['username_invalid'] = true;
     }
     $this->initAuth();
 }
開發者ID:arlendotcn,項目名稱:ilias,代碼行數:42,代碼來源:class.ilAuthApache.php

示例15: DbExternalTokenAuth

 function __construct($dbInfo)
 {
     parent::__construct();
     $this->db = new DbExternalTokenAuth($dbInfo);
 }
開發者ID:ppschweiz,項目名稱:vvvote,代碼行數:5,代碼來源:auth.php


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