当前位置: 首页>>代码示例>>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;未经允许,请勿转载。