本文整理汇总了PHP中session::refresh方法的典型用法代码示例。如果您正苦于以下问题:PHP session::refresh方法的具体用法?PHP session::refresh怎么用?PHP session::refresh使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类session
的用法示例。
在下文中一共展示了session::refresh方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: preinit
public function preinit()
{
parent::preinit();
session_name('sampleApp');
session_start();
if (session::logged_in()) {
session::refresh();
}
}
示例2: array
}
if ($valid) {
$user_data = array('IPADDRESS' => get_ip_address(), 'REFERER' => session::get_http_referer(), 'LOGON' => $logon, 'NICKNAME' => $nickname, 'EMAIL' => $email);
if (ban_check($user_data)) {
$error_msg_array[] = gettext("The username or password you supplied is not valid.");
$valid = false;
}
}
if ($valid) {
if ($new_uid = user_create($logon, $password, $nickname, $email)) {
// Save the new user preferences
user_update_prefs($new_uid, $new_user_prefs);
// Save the new user signature
user_update_sig($new_uid, $sig_content, $sig_html);
// Initialise the new user session.
session::refresh($new_uid);
// Check to see if the user is going somewhere after they have registered.
$final_uri = isset($final_uri) ? rawurlencode($final_uri) : '';
// If User Confirmation is enabled send the forum owners an email.
if (forum_get_setting('require_user_approval', 'Y')) {
admin_send_user_approval_notification();
}
// If New User Notification is enabled send the forum owners an email.
if (forum_get_setting('send_new_user_email', 'Y')) {
admin_send_new_user_notification($new_uid);
}
// Display final success / confirmation page.
if (forum_get_setting('require_email_confirmation', 'Y')) {
if (email_send_user_confirmation($new_uid)) {
perm_user_apply_email_confirmation($new_uid);
html_draw_top(sprintf("title=%s", gettext("User Registration")));
示例3: create
public static function create($uid)
{
if (!($forum_fid = get_forum_fid())) {
$forum_fid = 0;
}
session::refresh($uid);
session::update_visitor_log($uid, $forum_fid);
forum_update_last_visit($uid);
}