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


PHP um_reset_user函数代码示例

本文整理汇总了PHP中um_reset_user函数的典型用法代码示例。如果您正苦于以下问题:PHP um_reset_user函数的具体用法?PHP um_reset_user怎么用?PHP um_reset_user使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: um_after_changing_user_password

function um_after_changing_user_password($user_id)
{
    global $ultimatemember;
    um_fetch_user($user_id);
    $ultimatemember->mail->send(um_user('user_email'), 'changedpw_email');
    um_reset_user();
}
开发者ID:Ksajikyan,项目名称:poiskuslug,代码行数:7,代码来源:um-actions-password.php

示例2: um_submit_form_errors_hook_logincheck

function um_submit_form_errors_hook_logincheck($args)
{
    global $ultimatemember;
    // Logout if logged in
    if (is_user_logged_in()) {
        wp_logout();
    }
    $user_id = isset($ultimatemember->login->auth_id) ? $ultimatemember->login->auth_id : '';
    um_fetch_user($user_id);
    $status = um_user('account_status');
    // account status
    switch ($status) {
        // If user can't login to site...
        case 'inactive':
        case 'awaiting_admin_review':
        case 'awaiting_email_confirmation':
        case 'rejected':
            um_reset_user();
            exit(wp_redirect(add_query_arg('err', esc_attr($status), $ultimatemember->permalinks->get_current_url())));
            break;
    }
    if (isset($args['form_id']) && $args['form_id'] == $ultimatemember->shortcodes->core_login_form() && $ultimatemember->form->errors && !isset($_POST[$ultimatemember->honeypot])) {
        exit(wp_redirect(um_get_core_page('login')));
    }
}
开发者ID:lytranuit,项目名称:wordpress,代码行数:25,代码来源:um-actions-login.php

示例3: um_send_password_change_email

/**
 * Overrides password changed notification
 * 
 */
function um_send_password_change_email($args)
{
    global $ultimatemember;
    um_fetch_user($user_id);
    $ultimatemember->user->password_changed();
    um_reset_user();
    return false;
}
开发者ID:CoolWP,项目名称:ultimatemember,代码行数:12,代码来源:um-actions-password.php

示例4: um_dynamic_user_profile_pagetitle

function um_dynamic_user_profile_pagetitle($title, $sep = '')
{
    global $paged, $page, $ultimatemember;
    $profile_title = um_get_option('profile_title');
    if (um_is_core_page('user') && um_get_requested_user()) {
        um_fetch_user(um_get_requested_user());
        $profile_title = $ultimatemember->mail->convert_tags($profile_title);
        $title = $profile_title;
        um_reset_user();
    }
    return $title;
}
开发者ID:Makenrro,项目名称:repos,代码行数:12,代码来源:um-filters-profile.php

示例5: um_add_custom_message_to_menu

function um_add_custom_message_to_menu($items, $args)
{
    global $ultimatemember;
    // this feature required logged in user
    if (!is_user_logged_in()) {
        return $items;
    }
    um_fetch_user(get_current_user_id());
    $items = $ultimatemember->shortcodes->convert_user_tags($items);
    um_reset_user();
    return $items;
}
开发者ID:Zurtr,项目名称:ultimatemember,代码行数:12,代码来源:um-filters-navmenu.php

示例6: listen_to_password_reset_uri

 function listen_to_password_reset_uri()
 {
     global $ultimatemember;
     if (isset($_REQUEST['act']) && $_REQUEST['act'] == 'reset_password' && isset($_REQUEST['hash']) && strlen($_REQUEST['hash']) == 40 && isset($_REQUEST['user_id']) && is_numeric($_REQUEST['user_id'])) {
         um_fetch_user($_REQUEST['user_id']);
         if ($_REQUEST['hash'] != um_user('reset_pass_hash')) {
             wp_die(__('This is not a valid hash, or it has expired.', 'ultimatemember'));
         }
         $ultimatemember->user->profile['reset_pass_hash_token'] = current_time('timestamp');
         $ultimatemember->user->update_usermeta_info('reset_pass_hash_token');
         $this->change_password = true;
         um_reset_user();
     }
 }
开发者ID:smithsa,项目名称:daily-job-hunter,代码行数:14,代码来源:um-password.php

示例7: um_comment_link_to_profile

function um_comment_link_to_profile($return)
{
    global $comment, $ultimatemember;
    if (isset($comment->user_id) && !empty($comment->user_id)) {
        if (isset($ultimatemember->user->cached_user[$comment->user_id]) && $ultimatemember->user->cached_user[$comment->user_id]) {
            $return = '<a href="' . $ultimatemember->user->cached_user[$comment->user_id]['url'] . '">' . $ultimatemember->user->cached_user[$comment->user_id]['name'] . '</a>';
        } else {
            um_fetch_user($comment->user_id);
            $ultimatemember->user->cached_user[$comment->user_id] = array('url' => um_user_profile_url(), 'name' => um_user('display_name'));
            $return = '<a href="' . $ultimatemember->user->cached_user[$comment->user_id]['url'] . '">' . $ultimatemember->user->cached_user[$comment->user_id]['name'] . '</a>';
            um_reset_user();
        }
    }
    return $return;
}
开发者ID:dracudakid,项目名称:WP_TrungTamTinHoc,代码行数:15,代码来源:um-filters-commenting.php

示例8: um_shortcode_args_filter

function um_shortcode_args_filter($args)
{
    global $ultimatemember;
    if ($ultimatemember->shortcodes->message_mode == true) {
        $args['template'] = 'message';
        $ultimatemember->shortcodes->custom_message = um_user(um_user('status') . '_message');
        um_reset_user();
    }
    foreach ($args as $k => $v) {
        if ($ultimatemember->validation->is_serialized($args[$k])) {
            if (!empty($args[$k])) {
                $args[$k] = unserialize($args[$k]);
            }
        }
    }
    return $args;
}
开发者ID:smithsa,项目名称:daily-job-hunter,代码行数:17,代码来源:um-filters-arguments.php

示例9: activate_account_via_email_link

 function activate_account_via_email_link()
 {
     global $ultimatemember;
     if (isset($_REQUEST['act']) && $_REQUEST['act'] == 'activate_via_email' && isset($_REQUEST['hash']) && strlen($_REQUEST['hash']) == 40 && isset($_REQUEST['user_id']) && is_numeric($_REQUEST['user_id'])) {
         // valid token
         um_fetch_user($_REQUEST['user_id']);
         if (um_user('account_status') != 'awaiting_email_confirmation') {
             wp_die('The activation link you used is invalid or has expired.');
         }
         if ($_REQUEST['hash'] != um_user('account_secret_hash')) {
             wp_die('The secret key provided does not match this one for the user.');
         }
         $ultimatemember->user->approve();
         $redirect = um_user('url_email_activate') ? um_user('url_email_activate') : um_get_core_page('login', 'account_active');
         um_reset_user();
         exit(wp_redirect($redirect));
     }
 }
开发者ID:smithsa,项目名称:daily-job-hunter,代码行数:18,代码来源:um-permalinks.php

示例10: activate_account_via_email_link

 function activate_account_via_email_link()
 {
     global $ultimatemember;
     if (isset($_REQUEST['act']) && $_REQUEST['act'] == 'activate_via_email' && isset($_REQUEST['hash']) && strlen($_REQUEST['hash']) == 40 && isset($_REQUEST['user_id']) && is_numeric($_REQUEST['user_id'])) {
         // valid token
         $user_id = absint($_REQUEST['user_id']);
         delete_option("um_cache_userdata_{$user_id}");
         um_fetch_user($user_id);
         if (um_user('account_status') != 'awaiting_email_confirmation') {
             wp_die('The activation link you used is invalid or has expired.');
         }
         if (strtolower($_REQUEST['hash']) !== strtolower(um_user('account_secret_hash'))) {
             wp_die('The secret key provided does not match this one for the user.');
         }
         $ultimatemember->user->approve();
         $redirect = um_user('url_email_activate') ? um_user('url_email_activate') : um_get_core_page('login', 'account_active');
         $login = (bool) um_user('login_email_activate');
         // log in automatically
         if (!is_user_logged_in() && $login) {
             $user = get_userdata($user_id);
             $user_id = $user->ID;
             // update wp user
             wp_set_current_user($user_id, $user_login);
             wp_set_auth_cookie($user_id);
             ob_start();
             do_action('wp_login', $user_login);
             ob_end_clean();
         }
         um_reset_user();
         do_action('um_after_email_confirmation', $user_id);
         exit(wp_redirect($redirect));
     }
 }
开发者ID:shramee,项目名称:ultimatemember,代码行数:33,代码来源:um-permalinks.php

示例11: load

 function load($args)
 {
     global $ultimatemember;
     ob_start();
     $defaults = array();
     $args = wp_parse_args($args, $defaults);
     // when to not continue
     $this->form_id = isset($args['form_id']) ? $args['form_id'] : null;
     if (!$this->form_id) {
         return;
     }
     $this->form_status = get_post_status($this->form_id);
     if ($this->form_status != 'publish') {
         return;
     }
     // get data into one global array
     $post_data = $ultimatemember->query->post_data($this->form_id);
     $args = apply_filters('um_pre_args_setup', $post_data);
     if (!isset($args['template'])) {
         $args['template'] = '';
     }
     if (isset($post_data['template']) && $post_data['template'] != $args['template']) {
         $args['template'] = $post_data['template'];
     }
     if (!$this->template_exists($args['template'])) {
         $args['template'] = $post_data['mode'];
     }
     if (!isset($post_data['template'])) {
         $post_data['template'] = $post_data['mode'];
     }
     $args = array_merge($post_data, $args);
     if (isset($args['use_globals']) && $args['use_globals'] == 1) {
         $args = array_merge($args, $this->get_css_args($args));
     } else {
         $args = array_merge($this->get_css_args($args), $args);
     }
     // filter for arguments
     $args = apply_filters('um_shortcode_args_filter', $args);
     extract($args, EXTR_SKIP);
     // for profiles only
     if ($mode == 'profile' && um_profile_id() && isset($args['role']) && $args['role'] && $args['role'] != $ultimatemember->query->get_role_by_userid(um_profile_id())) {
         return;
     }
     // start loading the template here
     do_action("um_pre_{$mode}_shortcode", $args);
     do_action("um_before_form_is_loaded", $args);
     do_action("um_before_{$mode}_form_is_loaded", $args);
     $this->template_load($template, $args);
     $this->dynamic_css($args);
     if (um_get_requested_user() || $mode == 'logout') {
         um_reset_user();
     }
     do_action('um_after_everything_output');
     $output = ob_get_contents();
     ob_end_clean();
     return $output;
 }
开发者ID:dracudakid,项目名称:WP_TrungTamTinHoc,代码行数:57,代码来源:um-shortcodes.php

示例12: um_force_admin_bar

function um_force_admin_bar()
{
    um_reset_user();
}
开发者ID:Zurtr,项目名称:ultimatemember,代码行数:4,代码来源:um-actions-wpadmin.php

示例13: um_reset_user_clean

								</div>
								<?php 
        }
        ?>
								
							</div>

							<div class="um-member-less"><a href="#"><i class="um-faicon-angle-up"></i></a></div>
						
						</div>
						
						<?php 
    }
    ?>
						
					</div>
					
	</div>
				
	<?php 
    um_reset_user_clean();
}
// end foreach
um_reset_user();
?>

	<div class="um-clear"></div>

</div>
开发者ID:jonfalcon,项目名称:ultimatemember,代码行数:29,代码来源:members-grid.php

示例14: um_get_display_name

function um_get_display_name($user_id)
{
    um_fetch_user($user_id);
    $name = um_user('display_name');
    um_reset_user();
    return $name;
}
开发者ID:lytranuit,项目名称:wordpress,代码行数:7,代码来源:um-short-functions.php

示例15: um_members_directory_display


//.........这里部分代码省略.........
                    if ($key && um_filtered_value($key)) {
                        $value = um_filtered_value($key);
                        ?>
						
						<div class="um-member-tagline"><?php 
                        echo $value;
                        ?>
</div>
						
						<?php 
                    }
                }
            }
            ?>
						
						<?php 
            if ($show_userinfo) {
                ?>
						
						<div class="um-member-meta-main">
						
							<?php 
                if ($userinfo_animate) {
                    ?>
							<div class="um-member-more"><a href="#"><i class="um-faicon-angle-down"></i></a></div>
							<?php 
                }
                ?>
							
							<div class="um-member-meta <?php 
                if (!$userinfo_animate) {
                    echo 'no-animate';
                }
                ?>
">
							
								<?php 
                foreach ($reveal_fields as $key) {
                    if ($key && um_filtered_value($key)) {
                        $value = um_filtered_value($key);
                        ?>
								
								<div class="um-member-metaline um-member-metaline-<?php 
                        echo $key;
                        ?>
"><span><strong><?php 
                        echo $ultimatemember->fields->get_label($key);
                        ?>
:</strong> <?php 
                        echo $value;
                        ?>
</span></div>
								
								<?php 
                    }
                }
                ?>
								
								<?php 
                if ($show_social) {
                    ?>
								<div class="um-member-connect">
								
									<?php 
                    $ultimatemember->fields->show_social_urls();
                    ?>

								</div>
								<?php 
                }
                ?>
								
							</div>

							<div class="um-member-less"><a href="#"><i class="um-faicon-angle-up"></i></a></div>
						
						</div>
						
						<?php 
            }
            ?>
						
					</div>
					
				</div>
				
				<?php 
            um_reset_user_clean();
        }
        // end foreach
        um_reset_user();
        ?>
				
				<div class="um-clear"></div>
				
			</div>
			
		<?php 
    }
}
开发者ID:dracudakid,项目名称:WP_TrungTamTinHoc,代码行数:101,代码来源:um-actions-members.php


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