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


PHP um_redirect_home函数代码示例

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


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

示例1: um_block_wpadmin_by_user_role

function um_block_wpadmin_by_user_role()
{
    global $ultimatemember;
    if (is_admin() && !defined('DOING_AJAX') && um_user('ID') && !um_user('can_access_wpadmin') && !is_super_admin(um_user('ID'))) {
        um_redirect_home();
    }
}
开发者ID:Zurtr,项目名称:ultimatemember,代码行数:7,代码来源:um-actions-wpadmin.php

示例2: account

 function account()
 {
     global $ultimatemember;
     if (um_is_core_page('account') && !is_user_logged_in()) {
         um_redirect_home();
     }
     if (um_is_core_page('account')) {
         $ultimatemember->fields->set_mode = 'account';
         $ultimatemember->fields->editing = true;
         if (get_query_var('um_tab')) {
             $this->current_tab = get_query_var('um_tab');
         }
     }
 }
开发者ID:smithsa,项目名称:daily-job-hunter,代码行数:14,代码来源:um-account.php

示例3: um_submit_account_details

function um_submit_account_details($args)
{
    global $ultimatemember;
    $tab = get_query_var('um_tab') ? get_query_var('um_tab') : 'general';
    if ($_POST['user_password'] && $_POST['confirm_user_password']) {
        $changes['user_pass'] = $_POST['user_password'];
        add_filter('send_password_change_email', 'um_send_password_change_email');
    }
    foreach ($_POST as $k => $v) {
        if (!strstr($k, 'password') && !strstr($k, 'um_account')) {
            $changes[$k] = $v;
        }
    }
    if (isset($changes['hide_in_members']) && $changes['hide_in_members'] == __('No', 'ultimatemember')) {
        delete_user_meta(um_user('ID'), 'hide_in_members');
        unset($changes['hide_in_members']);
    }
    // fired on account page, just before updating profile
    do_action('um_account_pre_update_profile', $changes, um_user('ID'));
    $ultimatemember->user->update_profile($changes);
    // delete account
    if ($_POST['single_user_password'] && $tab == 'delete') {
        if (current_user_can('delete_users') || um_user('can_delete_profile')) {
            if (!um_user('super_admin')) {
                $ultimatemember->user->delete();
                if (um_user('after_delete') && um_user('after_delete') == 'redirect_home') {
                    um_redirect_home();
                } elseif (um_user('delete_redirect_url')) {
                    exit(wp_redirect(um_user('delete_redirect_url')));
                } else {
                    um_redirect_home();
                }
            }
        }
    }
    do_action('um_post_account_update');
    do_action('um_after_user_account_updated', get_current_user_id());
    $url = $ultimatemember->account->tab_link($tab);
    $url = add_query_arg('updated', 'account', $url);
    if (function_exists('icl_get_current_language')) {
        if (icl_get_current_language() != icl_get_default_language()) {
            $url = $ultimatemember->permalinks->get_current_url(true);
            $url = add_query_arg('updated', 'account', $url);
            exit(wp_redirect($url));
        }
    }
    exit(wp_redirect($url));
}
开发者ID:samuelshih,项目名称:daily-gazette,代码行数:48,代码来源:um-actions-account.php

示例4: logout_page

 function logout_page()
 {
     if (um_is_core_page('logout')) {
         if (is_user_logged_in()) {
             if (isset($_REQUEST['redirect_to']) && $_REQUEST['redirect_to'] !== '') {
                 $redirect_to = $_REQUEST['redirect_to'];
             } else {
                 if (um_user('after_logout') == 'redirect_home') {
                     $redirect_to = home_url();
                 } else {
                     $redirect_to = um_user('logout_redirect_url');
                 }
             }
             wp_logout();
             exit(wp_redirect($redirect_to));
         } else {
             um_redirect_home();
         }
     }
 }
开发者ID:BurlesonBrad,项目名称:ultimatemember,代码行数:20,代码来源:um-logout.php

示例5: logout_page

 function logout_page()
 {
     if (um_is_core_page('logout')) {
         if (is_user_logged_in()) {
             if (isset($_REQUEST['redirect_to']) && $_REQUEST['redirect_to'] !== '') {
                 wp_logout();
                 session_unset();
                 exit(wp_redirect($_REQUEST['redirect_to']));
             } else {
                 if (um_user('after_logout') == 'redirect_home') {
                     wp_logout();
                     session_unset();
                     um_redirect_home();
                 } else {
                     wp_logout();
                     session_unset();
                     exit(wp_redirect(um_user('logout_redirect_url')));
                 }
             }
         } else {
             um_redirect_home();
         }
     }
 }
开发者ID:TeamSubjectMatter,项目名称:juddfoundation,代码行数:24,代码来源:um-logout.php

示例6: access_members

 function access_members()
 {
     if (um_get_option('members_page') == 0 && um_is_core_page('members')) {
         um_redirect_home();
     }
 }
开发者ID:purplewhite,项目名称:ultimatemember,代码行数:6,代码来源:um-members.php

示例7: um_pre_profile_shortcode

function um_pre_profile_shortcode($args)
{
    global $ultimatemember;
    extract($args);
    if ($mode == 'profile' && $ultimatemember->fields->editing == false) {
        $ultimatemember->fields->viewing = 1;
        if (um_get_requested_user()) {
            if (!um_can_view_profile(um_get_requested_user())) {
                um_redirect_home();
            }
            if (!um_current_user_can('edit', um_get_requested_user())) {
                $ultimatemember->user->cannot_edit = 1;
            }
            um_fetch_user(um_get_requested_user());
        } else {
            if (!is_user_logged_in()) {
                um_redirect_home();
            }
            if (!um_user('can_edit_profile')) {
                $ultimatemember->user->cannot_edit = 1;
            }
        }
    }
    if ($mode == 'profile' && $ultimatemember->fields->editing == true) {
        $ultimatemember->fields->editing = 1;
        if (um_get_requested_user()) {
            if (!um_current_user_can('edit', um_get_requested_user())) {
                um_redirect_home();
            }
            um_fetch_user(um_get_requested_user());
        }
    }
}
开发者ID:TeamSubjectMatter,项目名称:juddfoundation,代码行数:33,代码来源:um-actions-profile.php

示例8: 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


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