• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP um_reset_user函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: um_admin_do_action__user_action

function um_admin_do_action__user_action($action)
{
    global $ultimatemember;
    if (!is_admin() || !current_user_can('edit_users')) {
        die;
    }
    if (!isset($_REQUEST['sub'])) {
        die;
    }
    if (!isset($_REQUEST['user_id'])) {
        die;
    }
    um_fetch_user($_REQUEST['user_id']);
    $subaction = $_REQUEST['sub'];
    do_action("um_admin_user_action_hook", $subaction);
    do_action("um_admin_user_action_{$subaction}_hook");
    um_reset_user();
    wp_redirect(add_query_arg('update', 'user_updated', admin_url('?page=ultimatemember')));
    exit;
}
开发者ID:Makenrro,项目名称:repos,代码行数:20,代码来源:um-admin-actions.php


示例17: 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', $status, $ultimatemember->permalinks->get_current_url())));
            break;
    }
}
开发者ID:smithsa,项目名称:daily-job-hunter,代码行数:22,代码来源:um-actions-login.php


示例18: get_author_name

 public function get_author_name($comment)
 {
     if (class_exists('UM_API') && isset($comment->user_id) && $comment->user_id) {
         um_fetch_user($comment->user_id);
         $author_name = um_user('display_name');
         um_reset_user();
     } else {
         if (isset($comment->user_id) && $comment->user_id) {
             $author_name = get_the_author_meta('display_name', $comment->user_id);
             $author_name = $author_name ? $author_name : get_the_author_meta('user_login', $comment->user_id);
         } else {
             $author_name = $comment->comment_author ? $comment->comment_author : __('Anonymous', WC_Core::$TEXT_DOMAIN);
         }
     }
     return $author_name;
 }
开发者ID:VLabsInc,项目名称:WordPressPlatforms,代码行数:16,代码来源:tpl-comment.php


示例19: um_access_profile

function um_access_profile($user_id)
{
    if (!um_is_myprofile() && um_is_core_page('user') && !current_user_can('edit_users')) {
        um_fetch_user($user_id);
        if (!in_array(um_user('account_status'), array('approved'))) {
            um_redirect_home();
        }
        um_reset_user();
    }
}
开发者ID:alexpull,项目名称:ultimatemember,代码行数:10,代码来源:um-actions-access.php


示例20: um_profile_dynamic_meta_desc

function um_profile_dynamic_meta_desc()
{
    global $ultimatemember;
    if (um_is_core_page('user') && um_get_requested_user()) {
        um_fetch_user(um_get_requested_user());
        $content = um_convert_tags(um_get_option('profile_desc'));
        $user_id = um_user('ID');
        $url = um_user_profile_url();
        if (um_profile('profile_photo')) {
            $avatar = um_user_uploads_uri() . um_profile('profile_photo');
        } else {
            $avatar = um_get_default_avatar_uri();
        }
        um_reset_user();
        ?>

			<meta name="description" content="<?php 
        echo $content;
        ?>
">

			<meta property="og:title" content="<?php 
        echo um_get_display_name($user_id);
        ?>
" />
			<meta property="og:type" content="article" />
			<meta property="og:image" content="<?php 
        echo $avatar;
        ?>
" />
			<meta property="og:url" content="<?php 
        echo $url;
        ?>
" />
			<meta property="og:description" content="<?php 
        echo $content;
        ?>
" />

		<?php 
    }
}
开发者ID:TeamSubjectMatter,项目名称:juddfoundation,代码行数:42,代码来源:um-actions-profile.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP um_user函数代码示例发布时间:2022-05-23
下一篇:
PHP um_redirect_home函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap