本文整理匯總了PHP中inflector::generatePassword方法的典型用法代碼示例。如果您正苦於以下問題:PHP inflector::generatePassword方法的具體用法?PHP inflector::generatePassword怎麽用?PHP inflector::generatePassword使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類inflector
的用法示例。
在下文中一共展示了inflector::generatePassword方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: createExtension
public static function createExtension()
{
Event::$data += array('sip_username' => html::token(Event::$data['owner_name']), 'sip_password' => inflector::generatePassword());
extract(Event::$data);
$plugin = array('sip' => array('username' => $sip_username, 'password' => $sip_password));
$device['plugins'] = arr::merge($device['plugins'], $plugin);
}
示例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;
}