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


PHP users::isUserAuthentic方法代码示例

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


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

示例1: initializeMasterTenant

 public static function initializeMasterTenant()
 {
     $session = Session::instance();
     Doctrine::getTable('Location')->getRecordListener()->get('MultiTenant')->setOption('disabled', true);
     Doctrine::getTable('User')->getRecordListener()->get('MultiTenant')->setOption('disabled', true);
     $options = array();
     $options['account'] = array('name' => 'Master Account', 'type' => Account::TYPE_NORMAL);
     $options['location'] = array('name' => 'Main Location');
     $options['user'] = array('username' => $session->get('installer.adminEmailAddress'), 'password' => $session->get('installer.adminPassword'), 'user_type' => User::TYPE_SYSTEM_ADMIN);
     Bluebox_Tenant::initializeTenant($options);
     Bluebox_Tenant::initializeSite('localhost', 1);
     // Force a login of the master/admin user for the remainder of the install
     Auth::instance()->force_login($session->get('installer.adminEmailAddress'));
     users::isUserAuthentic();
     users::getCurrentUser();
 }
开发者ID:swk,项目名称:bluebox,代码行数:16,代码来源:configure.php

示例2: finalize

 /**
  * This step finalizes the installation (whatever that means)
  *
  * @return subview
  */
 private function finalize()
 {
     $subview = new View('installer/finalize');
     $this->template->title = __('Complete!');
     $this->template->allowPrev = FALSE;
     $this->template->allowNext = FALSE;
     // Force a login of the master/admin user for the remainder of the install
     Auth::instance()->force_login($this->session->get('installer.adminEmailAddress'));
     users::isUserAuthentic();
     users::getCurrentUser();
     $created = $this->session->get('Bluebox_installer.created');
     Bluebox_Tenant::createUserExtension($created['userId']);
     if (Session::instance()->get('installer.samples', FALSE)) {
         $sampleUsers = array(array('first' => 'Peter', 'last' => 'Gibbons', 'username' => 'peter@initech.com', 'password' => inflector::generatePassword(), 'user_type' => User::TYPE_NORMAL_USER), array('first' => 'Michael', 'last' => 'Bolton', 'username' => 'michael@initech.com', 'password' => inflector::generatePassword(), 'user_type' => User::TYPE_NORMAL_USER), array('first' => 'Samir', 'last' => 'Nagheenanajar', 'username' => 'samir@initech.com', 'password' => inflector::generatePassword(), 'user_type' => User::TYPE_NORMAL_USER), array('first' => 'Bill', 'last' => 'Lumbergh', 'username' => 'bill@initech.com', 'password' => inflector::generatePassword(), 'user_type' => User::TYPE_NORMAL_USER), array('first' => 'Milton', 'last' => 'Waddams', 'username' => 'milton@initech.com', 'password' => inflector::generatePassword(), 'user_type' => User::TYPE_NORMAL_USER));
         foreach ($sampleUsers as $sampleUser) {
             $userId = Bluebox_Tenant::initializeUser($created['accountId'], $created['locationId'], $sampleUser);
             Bluebox_Tenant::createUserExtension($userId);
         }
     }
     if ($this->session->get('installer.tel_driver') == 'freeswitch') {
         Event::run('freeswitch.reload.xml');
         Event::run('freeswitch.reload.acl');
         Event::run('freeswitch.reload.sofia');
     }
     self::_resetWizard();
     $this->session->delete('Bluebox_message');
     // Disable the installer after a successful installtion
     self::updateConfig(array('installer_enabled' => 'FALSE'), 'config');
     Kohana::log('info', 'Installer wizard terminated');
     return $subview;
 }
开发者ID:swk,项目名称:bluebox,代码行数:36,代码来源:installer.php

示例3: masqueradeUser

 public static function masqueradeUser($user_id, $retain_type = TRUE)
 {
     Doctrine::getTable('User')->getRecordListener()->get('MultiTenant')->setOption('disabled', TRUE);
     $user = Doctrine::getTable('User')->find($user_id, Doctrine::HYDRATE_ARRAY);
     Doctrine::getTable('User')->getRecordListener()->get('MultiTenant')->setOption('disabled', FALSE);
     if (!$user) {
         return FALSE;
     }
     if ($retain_type) {
         unset($user['user_type']);
     }
     $session = Session::instance();
     $masquerades = $session->get('bluebox.user.masquerades', array());
     $masquerades = arr::merge($user, $masquerades);
     $session->set('bluebox.user.masquerades', $masquerades);
     users::isUserAuthentic();
     return TRUE;
 }
开发者ID:swk,项目名称:bluebox,代码行数:18,代码来源:users.php


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