本文整理汇总了PHP中module_security::auto_login方法的典型用法代码示例。如果您正苦于以下问题:PHP module_security::auto_login方法的具体用法?PHP module_security::auto_login怎么用?PHP module_security::auto_login使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类module_security
的用法示例。
在下文中一共展示了module_security::auto_login方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
/**
* Copyright: dtbaker 2012
* Licence: Please check CodeCanyon.net for licence details.
* More licence clarification available here: http://codecanyon.net/wiki/support/legal-terms/licensing-terms/
* Deploy: 9809 f200f46c2a19bb98d112f2d32a8de0c4
* Envato: 4ffca17e-861e-4921-86c3-8931978c40ca
* Package Date: 2015-11-25 02:55:20
* IP Address: 67.79.165.254
*/
if (_UCM_INSTALLED && !module_security::is_logged_in() && !module_config::c('cron_last_run', 0) && !module_config::c('initial_setup_complete', 0)) {
module_config::save_config('initial_setup_complete', 1);
$_REQUEST['auto_login'] = module_security::get_auto_login_string(1);
if (!module_security::auto_login(false)) {
echo 'Failed to login automatically...';
}
}
if (_UCM_INSTALLED && !module_security::is_logged_in()) {
ob_end_clean();
echo 'Something went wrong. Please login and go to Settings > Upgrade. <a href="' . _BASE_HREF . '">Click here to login</a>.';
exit;
}
print_heading('Step #3: Initial system update');
if (isset($_REQUEST['run_upgrade']) || isset($_REQUEST['install_upgrade']) && isset($_REQUEST['save_license_codes']) && isset($_REQUEST['license_codes']) && trim($_REQUEST['license_codes'][0])) {
$setup_upgrade_hack = true;
include 'includes/plugin_config/pages/config_upgrade.php';
} else {
?>
<p>
示例2: eval
eval('echo module_'.$plugin_name.'::$module_name_hack;');
echo '<br>';
}*/
if (!function_exists('sort_plugins')) {
function sort_plugins($a, $b)
{
return $a->module_position > $b->module_position;
}
}
uasort($plugins, 'sort_plugins');
if (isset($_REQUEST['auto_login'])) {
if ($_REQUEST['auto_login'] == 123) {
$_REQUEST['auto_login'] = module_security::get_auto_login_string(1);
}
// try to process an auto login.
module_security::auto_login();
}
if (isset($_REQUEST['_process_reset'])) {
if (class_exists('module_captcha', false)) {
if (!module_captcha::check_captcha_form()) {
// captcha was wrong.
_e('Sorry the captcha code you entered was incorrect. Please <a href="%s" onclick="%s">go back</a> and try again.', '#', 'window.history.go(-1); return false;');
exit;
}
}
module_security::process_password_reset();
}
if (isset($_REQUEST['_process_login'])) {
// check recaptcha
module_security::process_login();
}